Page 1 of 1

Date repeat

Posted: Wed May 07, 2008 2:27 pm
by 5890344
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.

Posted: Wed May 07, 2008 2:35 pm
by narcis
Hi alexiat,

You need to set bottom axis Increment to one day. For more information on how to do that please reat Tutorial 4 - Axis Control. Tutorials can be found at TeeChart's program group.

Posted: Thu May 08, 2008 3:01 pm
by 5890344
Thank you. I guess I missed that in the tutorial. I knew it had to be something easy!