TeeChart : Dates as X axis values

TeeChart for ActiveX, COM and ASP
Post Reply
DraegerSoft
Newbie
Newbie
Posts: 4
Joined: Thu Oct 18, 2007 12:00 am

TeeChart : Dates as X axis values

Post by DraegerSoft » Thu Jun 25, 2009 1:54 pm

I'm using Teechart to create a simple line graph having two data series (both time series). In some cases these can span a period from 1880 - 2009. I find that on zooming a graph, or displaying a sub-set of the data, Dates before 1900 display with earliest in the RIGHT hand, while those after 1900 display with earliest in the LEFT.

The Activex is being used in a VB6 project.

The x-axis values being set are VB Date variables.

Can you advise me?

Many thanks

Mike Diggle (Draeger)

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

Re: TeeChart : Dates as X axis values

Post by Yeray » Thu Jun 25, 2009 3:26 pm

Hi Mike,

I've tried to reproduce your problem with the following code. The only think that I've seen is that the labels earlier to 30/12/1899 aren't displayed. Is that what you mean?

Code: Select all

Private Sub Form_Load()  
  TChart1.Aspect.View3D = False
  
  TChart1.AddSeries scLine
  TChart1.AddSeries scLine
  
  TChart1.Series(0).XValues.DateTime = True
  TChart1.Series(1).XValues.DateTime = True
  
  For i = 0 To 5
    TChart1.Series(0).AddXY DateValue("1/0" & Trim(Str$(i + 1)) & "/1880"), Rnd * 100, "", clTeeColor
    TChart1.Series(1).AddXY DateValue("1/0" & Trim(Str$(i + 1)) & "/1880"), Rnd * 100, "", clTeeColor
  Next i
  
  For i = 0 To 5
    TChart1.Series(0).AddXY DateValue("1/0" & Trim(Str$(i + 1)) & "/2009"), Rnd * 100, "", clTeeColor
    TChart1.Series(1).AddXY DateValue("1/0" & Trim(Str$(i + 1)) & "/2009"), Rnd * 100, "", clTeeColor
  Next i
  
  TChart1.Repaint
  TChart1.Axis.Bottom.SetMinMax DateValue("1/01/1880"), DateValue("1/01/1900")
End Sub
If not, please, could you be so kind to send us a simple example project we can run as-is to reproduce the problem here?
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

DraegerSoft
Newbie
Newbie
Posts: 4
Joined: Thu Oct 18, 2007 12:00 am

Re: TeeChart : Dates as X axis values

Post by DraegerSoft » Fri Jun 26, 2009 7:59 am

Thanks for your help - we've just upgraded to the latest version of Tchart , and that seem to have fixed the problem.

Mike Diggle - Draeger

Post Reply