I am creating a Firemonkey (FMX) application. I use TChart with a Line Series (TLineSeries). I need to draw a chart line that is not continuous. The x-axis is date time and I want the line to be drawn say between 10 and 11AM and then again between 3PM and 4PM. I tried the following but it always draws a continuous line from the first point (X1) to the last point (X4):
Series.TreatNulls:=TTreatNullsStyle.tnDontPaint;
Series.AddXY(X1,1);
Series.AddXY(X2,1);
Series.AddNullXY(X2,1);
Series.AddNullXY(X3,1);
Series.AddXY(X3,1);
Series.AddXY(X4,1);
Where
X1=date value at 10AM
X2=date value at 11AM
X3=date value at 3PM
X4=date value at 4PM
I tried various combinations of TreatNulls but still no success. I am using TeeChart Version 2021.32
Any suggestions would be appreciated.