TDBChart OnClickSeries gives wrong ValueIndex
Posted: Wed Mar 29, 2017 5:31 pm
Hello,
I use the OnClickSeries event to get the X value in a TLineSeries chart from the ValueIndex using Series.XValues[ValueIndex].
However, it looks like most of the time the Index returned in the OnClickSeries evenat after clicking is corresponding to the previous point in the series.
The X parameter and axis are of TDatetime time, so the X value is in the order of 42400 or something (around year 2016). Between 2 points there often is a day or so. Is this a round off error? Is the resolution to do this not sufficient to keep 2 points of say 42400 and 42401 apart with OnClickSeries?
Also if I determine the index using Series.Clicked(X,Y) I get the index of the prior point.
Or am I overlooking something.
Thanks, Wilfried
I use the OnClickSeries event to get the X value in a TLineSeries chart from the ValueIndex using Series.XValues[ValueIndex].
However, it looks like most of the time the Index returned in the OnClickSeries evenat after clicking is corresponding to the previous point in the series.
The X parameter and axis are of TDatetime time, so the X value is in the order of 42400 or something (around year 2016). Between 2 points there often is a day or so. Is this a round off error? Is the resolution to do this not sufficient to keep 2 points of say 42400 and 42401 apart with OnClickSeries?
Also if I determine the index using Series.Clicked(X,Y) I get the index of the prior point.
Or am I overlooking something.
Thanks, Wilfried