WPF HitTesting on Stock Candle/Bar Data?


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

  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


Matthew Crider
Matthew Crider
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
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?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search