Hello
We were using wpf version prior to 6, we just purchased new license and downloaded latest, but we found the HitTest api is gone, below is our code, it tries to figure out the line being clicked and get its data series.
Could you please let us know how to replace HitTest api?
Thanks
Sally
private void ChartPointClicked(object sender, MouseButtonEventArgs e)
{
e.Handled = true;
Point mousePoint = e.GetPosition(Chart.GridLinesPanel as UIElement);
double datapointRadius = 8;
bool useInterpolation = false;
HitTestInfo result;
if (LineSeries.DataSeries != null)
result = LineSeries.HitTest(mousePoint,datapointRadius, useInterpolation);
else if (BoxSeries.DataSeries != null)
result = BoxSeries.HitTest(mousePoint, datapointRadius, useInterpolation);
else
return;
if (!result.IsHit)
return;
if (result.DataSeriesIndex <= Events.Count)
{
List<wExportEvent> runs = new List<wExportEvent>();
runs = Events.Select(x => x.Wsdl).ToList();
OpenRunSummary(runs, result.DataSeriesIndex);
}
}
- sally an asked 10 months ago
- You must login to post comments
Hi Sally,
Thanks for your inquiry.
I am sorry for the misunderstanding. HitTest API is one of the core SciChart APIs and it’s still available.
Please take a look:
https://www.scichart.com/documentation/win/current/webframe.html#RenderableSeries%20APIs%20-%20Hit%20Testing.html
However, there might be some breaking changes depending on which SciChart version you have previously used.
Could you please specify your requirements so we can provide you with a proper solution?
Thanks in advance,
Lex,
SciChart Technical Support Engineer
- Lex answered 9 months ago
- You must login to post comments
We found using new api works, code as below:
result =LineSeries.HitTestProvider.VerticalSliceHitTest(mousePoint);
- sally an answered 10 months ago
- last edited 9 months ago
- You must login to post comments
Hi Lex
We did find a work around using HitTestProvider like below:
LineSeries.HitTestProvider.VerticalSliceHitTest(mousePoint);
Is it possible the old HitTest was moved to another dll? Our previous version was quite old, date back at least 5 years ago.
Thanks.
Sally
- sally an answered 9 months ago
- last edited 9 months ago
- You must login to post comments
Please login first to submit.