Displaying values under Vertical cursor, Locate inaccurate

TeeChart for ActiveX, COM and ASP
Post Reply
Ragnar
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: Iceland

Displaying values under Vertical cursor, Locate inaccurate

Post by Ragnar » Mon Apr 19, 2004 11:34 am

Hello.

I am using the Cursor Tool to display series values. I use the OnCursorToolChange event to change the values displayed (added behind the series titles in the legend).

Sub axChart_OnCursorToolChange(Tool, X , Y ,XVal,YVal, Series, ValueIndex)
With axChart
.SubFooter.Visible = True
.SubFooter.Text.Clear
.SubFooter.Text.Add "Timestamp: " & cdate(XVal)
For i = 0 To .SeriesCount - 1
idx = axChart.Series(i).XValues.Locate(XVal)
.Series(i).Title = SeriesTitles(i) & " (" & FormatNumber(.Series(i).YValues.Value(idx), 3) & .Axis.Left.Title.Caption & ")"
Next
End With
End Sub

This works fine for one serie but when I add series the following series values are wrongly implied 0 for some values (axChart.Series(i).YValues.Value(idx) return 0 which is wrong). The data is time stamped data using the same timestamps and have been verified. The Cusor tool snaps to data points.

I am using ASP.Net and ActiveX version 5.0.5.

What Is the problem here? Can this be done any other way?

Ragnar
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: Iceland

My mistake, there where milliseconds difference

Post by Ragnar » Mon Apr 19, 2004 2:25 pm

Sorry about this.

Ragnar
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: Iceland

Post by Ragnar » Mon Apr 19, 2004 2:27 pm

There was milliseconds difference in the series causing the Locate to fail. Sorry, my mistake.

Post Reply