We have annotations placed based on mouseposition. To snap the annotation to the position of the datapoints, we use
IDataSeries.FindClosestPoint(..) method to step to the nearest point, then applying it to the “X1”-property of the belonging annotation. This works well for most of the Series, but it fails for
InvalidCastException Specified cast is not valid.
Is this a known issue, any work-arounds for this ?
As explained above, we use this method to snap to the datapoints, and so yes, the index is what we want.
XyDataSeries<int, double> is a valid series type and FindClosestPoint() seems to always throw an exception for this kind of series.
If there are any samples with an <int, double> series working, please let us know.
Thanks for your inquiry.
Unfortunately, we have noticed your license support has expired.
If you wish to continue receiving technical support further please consider renewing your support subscription.
To do that please contact Sales here:
Or email us to email@example.com
If you believe this is not correct please provide your new order details.
Please login first to submit.