Group: Forum Members
Last Active: 2 Years Ago
Posts: 0,
Visits: 78
|
In my WPF code, I'm calling
var hitElement = chartControl.HitTest(mouseEvent.Location.X, mouseEvent.Location.Y);
inside a mouse click handler, and I'm getting a DataPoint hit back correctly. This is working well.
When I click on a data point in a stock series that has OHLC data displayed as a bar or stick, will I be able, through hit testing, have any way of knowing whether the Open, Close, High or Low portion of that data point was clicked?
|
Group: Forum Members
Last Active: 23 seconds ago
Posts: 3,054,
Visits: 4,009
|
Hi, No unfortunately this information is not available in the hit test result. You can however perform a view to scale transformation: NChart chart = (NChart)nChartControl1.Charts[0]; NViewToScale2DTransformation view2Scale = new NViewToScale2DTransformation(chart, (int)StandardAxis.PrimaryX, (int)StandardAxis.PrimaryY); NVector2DD scalePoint = new NVector2DD(); view2Scale.Transform(new NPointF(e.X, e.Y), ref scalePoint); and determine how the point is positioned relative to the OHLC range.
We hope this helps - let us know if you have any questions.
Best Regards, Nevron Support Team
|