It seems that TFastLine series plotting is broken in the latest Beta, if DrawAllPoints := False and Null values are used.
Also in some cases panning operation raises and exception RangeError with the stack trace:
============================================
Series.TFastLineSeries.GetLastYMaxIndex(4211962)
Series.TFastLineSeries.GetLastYMaxIndex(-1)
Series.TFastLineSeries.CalcFirstLastVisibleIndex
TeEngine.DrawSeries($2056C40)
TeEngine.DoDraw(0,1,1)
TeEngine.DrawAllSeries
TeEngine.TCustomAxisPanel.DrawAxesSeries
============================================
Simple example to reproduce this problem:
In OnCreate handler use the code:
Code: Select all
{$DEFINE FAST}
procedure TForm1.FormCreate(Sender: TObject);
begin
Ch.BottomAxis.AutomaticMinimum := False;
Ch.BottomAxis.Minimum := 0.0;
{$IFDEF FAST}
Ch.AddSeries( TFastLineSeries );
TFastLineSeries(Ch.Series[0]).TreatNulls := tnDontPaint;
TFastLineSeries(Ch.Series[0]).DrawAllPoints := False;
{$ELSE}
Ch.AddSeries( TLineSeries );
TLineSeries(Ch.Series[0]).TreatNulls := tnDontPaint;
{$ENDIF}
Ch.Series[0].AddXY( 1.0, -2.0 );
Ch.Series[0].AddXY( 1.0, 2.0 );
Ch.Series[0].AddNullXY( 1.25, 3.0 );
Ch.Series[0].AddXY( 1.5, 1.0 );
Ch.Series[0].AddXY( 1.8, 2.0 );
Ch.Series[0].AddXY( 2.0, 1.0 );
Ch.Series[0].AddXY( 2.4, 2.0 );
Ch.Series[0].AddXY( 2.8, 1.0 );
Ch.Series[0].AddXY( 3.1, 2.0 );
end;
2) Try panning operation and move the chart to the right (far enough!).
Regards,
Michael