Page 1 of 1

Teechart Properties Produces Incorrect Desired Increment

Posted: Tue Aug 10, 2004 2:03 pm
by 9078528
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.

Posted: Tue Aug 10, 2004 2:44 pm
by 9078528
Note that TChart1.GetDateTimeStep(dtOneDay) returns 0.5. I would have expected it to return 1.0.

Posted: Tue Aug 10, 2004 11:51 pm
by Pep
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 ?

Posted: Thu Aug 12, 2004 9:29 pm
by 9078528
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.

Posted: Fri Aug 13, 2004 2:11 pm
by Pep
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.