Teechart Properties Produces Incorrect Desired Increment

TeeChart for ActiveX, COM and ASP
Post Reply
DaveB
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Rochester , NY
Contact:

Teechart Properties Produces Incorrect Desired Increment

Post by DaveB » Tue Aug 10, 2004 2:03 pm

For time series, changing the desired increment setting produces an off-by-one error. In other words, setting the dialog to One Week produces tick marks every Three Days and settting the it to One Month produces tick marks every One Week.

DaveB
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Rochester , NY
Contact:

Post by DaveB » Tue Aug 10, 2004 2:44 pm

Note that TChart1.GetDateTimeStep(dtOneDay) returns 0.5. I would have expected it to return 1.0.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Aug 10, 2004 11:51 pm

Hi Dave,

I cannot reproduce the problem here (with the TeeChart v6.0.0.5) using the following code :

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scLine
    .Series(0).XValues.DateTime = True
    .Axis.Bottom.Labels.Angle = 90
    .Axis.Bottom.Increment = .GetDateTimeStep(dtOneMonth)
    For i = 37700 To 37725
    .Series(0).AddXY i, Rnd * 100, "", clTeeColor
    Next i
End With
End Sub

Private Sub Command1_Click()
MsgBox TChart1.GetDateTimeStep(dtOneDay)
End Sub
Also, it returns 1 to me.
Which TeeChart Pro version are you using ? Also, if you still having problems, could you please post the code you're using so I can reproduce the problem "as is" here ?

DaveB
Newbie
Newbie
Posts: 14
Joined: Thu May 08, 2003 4:00 am
Location: Rochester , NY
Contact:

Post by DaveB » Thu Aug 12, 2004 9:29 pm

I have found the problem with my C++ code returning the wrong value in the call to GetDateTimeStep(). It seems that TChart has added a new constant to the TeeChartDefines.h file namely dtOneMicrosecond which shifted the other constants by one.

I have e-mailed you a sample project that demonstrates the Teechart properties problem.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Aug 13, 2004 2:11 pm

Hi Dave,

yes, you're correct , I'm able to reproduce the problem, it's a bug. I've added it on our defect list and a fix it will be considered to inclusion for the next maintenance release. Thanks for the report.

Post Reply