Page 1 of 1

How to programmatically switch DateTime property of Axis

Posted: Tue Mar 17, 2009 10:35 am
by 10547842
Hi TChart Team,

I can switch on/off the DateTime property for the Vertical Axis of a TColorGridSeries by selecting this series in the editor window and then activating the "General" tab. There you find this switch in the "Vertical Axis" group box.

How can I do that programmatically for a TColorGridSeries?

best regards

Posted: Tue Mar 17, 2009 11:05 am
by yeray
Hi xray,

Have you tried this?

Code: Select all

Chart1.Axes.Left.IsDateTime := true;

Posted: Tue Mar 17, 2009 12:05 pm
by 10547842
Hi Yeray,

this can't work because:

Chart1.Axes.Left.IsDateTime

is a function not a writable property.

Any other hints?

Posted: Tue Mar 17, 2009 12:12 pm
by yeray
Hi xray,

Of course, I'm sorry. I wanted to go too fast. This is the good one:

Code: Select all

Series1.YValues.DateTime := true;