Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2001

Summary: NearestPoint tool never considers Null points
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ToolsAssignee: yeray alonso <yeray>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2018-02-23 10:40:02 EST
NearestPoint tool doesn't highlight Null points when they are drawn (TreatNulls:=tnIgnore, as per default).

Here a simple example:

uses Series, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
var fast1: TFastLineSeries;
    nearest1: TNearestTool;
    i: Integer;
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  fast1 := Chart1.AddSeries(TFastLineSeries) as TFastLineSeries;
  for i:=0 to 1999 do
  begin
    if (i = 1000) then
       fast1.AddNullXY(i, 200)
    else
       fast1.AddXY(i, 100);
  end;

  fast1.TreatNulls:=tnIgnore;

  Chart1.Axes.Bottom.SetMinMax(0, 2000);
  Chart1.Axes.Left.SetMinMax(0, 300);

  nearest1:=Chart1.Tools.Add(TNearestTool) as TNearestTool;
  nearest1.Brush.Clear;
  nearest1.Pen.Color:=clRed;
  nearest1.Series:=fast1;
end;

Similar bug in TeeChart Java:
http://bugs.teechart.net/show_bug.cgi?id=1999

Similar bug in TeeChart .NET:
http://bugs.teechart.net/show_bug.cgi?id=2000