SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I have a chart that has a DateTime XAxis and a NumericYAxis. I want to do something such as FastLineRenderableSeries.GetYValueAt(datetime) yet i can’t find a suitable extension method for such thing. Seems like a fairly simple thing but the documentation does not cover it.
We have an API to do this – called the HitTest API.
You can find Hit Test API documentation here.
Basically, you call RenderableSeries.HitTest to get the details of a point under an X,Y coordinate, or RenderableSeries.VerticalSliceHitTest to get the details of a point at an X-Value.
The HitTestInfo result contains details about the point that was hit.
Some code like this should work:
FastLineRenderableSeries rSeries; DateTime dateTime; double xCoord = rSeries.XAxis.GetCoordinate(dateTime); var hitTestInfo = rSeries.VerticalSliceHitTest(new Point(xCoord, 0)); Console.WriteLine("Y-Value is " + hitTestInfo.YValue.ToString());
Please login first to submit.