Date repeat
Posted: Wed May 07, 2008 2:27 pm
Delphi 2007, VCL.
I dropped a chart on a form and added a line series. In my code I have:
series1.xvalues.datetime := true;
chart1.bottomaxis.datetimeformat := 'm/d h:mm';
series1.addxy(EncodeDate(2008,4,23),27);
series1.addxy(EncodeDate(2008,4,30),30);
series1.addxy(EncodeDate(2008,5,1),24);
If I do this all works well. However, if I change the datetimeformat to 'm/d' then each day repeats twice; i.e. 4/23 - 4/23 - 4/24 - 4/25 etc.
Can someone please tell me what I need to set to make this not happen.
Thanks.
I dropped a chart on a form and added a line series. In my code I have:
series1.xvalues.datetime := true;
chart1.bottomaxis.datetimeformat := 'm/d h:mm';
series1.addxy(EncodeDate(2008,4,23),27);
series1.addxy(EncodeDate(2008,4,30),30);
series1.addxy(EncodeDate(2008,5,1),24);
If I do this all works well. However, if I change the datetimeformat to 'm/d' then each day repeats twice; i.e. 4/23 - 4/23 - 4/24 - 4/25 etc.
Can someone please tell me what I need to set to make this not happen.
Thanks.