Date labels on line series chart

TeeChart for ActiveX, COM and ASP
Post Reply
Roger Nye
Newbie
Newbie
Posts: 10
Joined: Tue Aug 17, 2004 4:00 am

Date labels on line series chart

Post by Roger Nye » Sun Aug 17, 2008 7:51 pm

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

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Aug 18, 2008 10:21 am

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Roger Nye
Newbie
Newbie
Posts: 10
Joined: Tue Aug 17, 2004 4:00 am

Post by Roger Nye » Mon Aug 18, 2008 10:46 am

Thanks Yeray,
That worked.
Roger

Post Reply