Hi,
Can you please tell me if Teechart 7 VCL for Delphi Pro 6 displays values that are null as zeros in the charts, or has this been fixed?
Thanks.
pl
TeeChart 7 VCL and nulls
Hi.
Hopefully we'll be able to implement something similar in next maintenance release.
I'm affraid not as you'd like it <gg>. The values are ommited, but internally they are still treated as normal points with color set to clNone. One problem which migt arise is the automatic axis range might be wrong if null points are in series. For this case, the following workaround can be used:eros in the charts, or has this been fixed?
Code: Select all
procedure NoNullsMinMax(Series: TChartSeries);
var i: Integer;
aminx, amaxx: double;
aminy, amaxy: double;
begin
aminx := Series.MaxXValue;
amaxx := Series.MinXValue;
aminy := Series.MaxYValue;
amaxy := Series.MinYValue;
for i := 0 to Series.Count -1 do
if Not (Series.IsNull(i)) then
begin
if Series.XValue[i] < aminx then aminx := Series.XValue[i];
if Series.XValue[i] > amaxx then amaxx := Series.XValue[i];
if Series.YValue[i] < aminy then aminy := Series.YValue[i];
if Series.YValue[i] > amaxy then amaxy := Series.YValue[i];
end;
Series.GetHorizAxis.SetMinMax(aminx,amaxx);
Series.GetVertAxis.SetMinMax(aminy,amaxy);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.Add(10);
Series1.Add(3);
Series1.AddNull;
Series1.Add(5);
Series1.Add(7);
NoNullsMinMax(Series1);
end;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com