Page 1 of 1

Date labels on line series chart

Posted: Sun Aug 17, 2008 7:51 pm
by 9523571
Hi,
I am trying to set up a line series with dates on the bottom axis.
Unfortunately, I am having to do this in Java using the ActiveX version through OLE codes, so it can be difficult to work out what is going on.

If there is a candle series in the chart it gives dates, but for a chart with only line series it gives value labels, I thought I could do the following:
1. Get the IAxes OLE automation object through ITChart.Axis (code 2)
2. Get the IAxisLabels automation through IAxis.Labels ( code 11)
3. Set the DateTimeFormat property using IAxisLabels.DateTimeFormat (code 6) to "dd/mm/yy"

It accepts the property change and returns 0, but the axis values still appear as values. (e.g. 39,215).

Any suggestions
Many thanks
Roger

Posted: Mon Aug 18, 2008 10:21 am
by yeray
Hi Roger,

Have you set the XValues as DateTime? For Candle series it is set by default, but not for line series.

To force it you should do the following:

Code: Select all

TChart1.Series(0).XValues.DateTime = true

Posted: Mon Aug 18, 2008 10:46 am
by 9523571
Thanks Yeray,
That worked.
Roger