The chart data is either 1 or 2 days with times at the bottom.
Chart.BottomAxis.DateTimeFormat := 'hh:MM';
The data contains a line running from 9:00 to 18:00
The idea is to remove the overnight gap.
Code: Select all
crttlAxisBreak.Breaks.Clear;
if Trunc(dttmpckFromDateStd.Date) <> Trunc(dttmpckToDateStd.Date) then // over 2 days
begin
DecodeDate(dttmpckFromDateStd.Date, yy, mm, dd);
DecodeDate(dttmpckToDateStd.Date, yy2, mm2, dd2);
crttlAxisBreak.Breaks.Add();
crttlAxisBreak.Breaks[0].AxisBreakStyle := tabSmallZigZag;
crttlAxisBreak.Breaks[0].StartValue := EncodeDateTime(yy, mm, dd, 18, 00, 0, 0);
crttlAxisBreak.Breaks[0].EndValue := EncodeDateTime(yy2, mm2, dd2, 8, 30, 0, 0);
end;
In v2011.03.30407 this used to work.