Page 1 of 1

Displaying values under Vertical cursor, Locate inaccurate

Posted: Mon Apr 19, 2004 11:34 am
by 6927410
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?

My mistake, there where milliseconds difference

Posted: Mon Apr 19, 2004 2:25 pm
by 6927410
Sorry about this.

Posted: Mon Apr 19, 2004 2:27 pm
by 6927410
There was milliseconds difference in the series causing the Locate to fail. Sorry, my mistake.