Hi,
I have two column charts which have been rotated so the y axis is horizontal and the x axis vertical. I am trying to capture the click on the column to display information. In my left button up event, I do a hit test and process it. I have noticed that sometimes the cursorModifier.seriesData is empty. This seems to happen at random.
This is the code I’m using
var hitTestPoint = e.GetPosition(domChart.GridLinesPanel as UIElement); var modifierGroup = ((ModifierGroup)domChart.ChartModifier); var cursorModifier = ((CursorModifier)modifierGroup.ChildModifiers[0]); //var cursorModifier = ((CursorModifier)domChart.ChartModifier); var seriesInfos = cursorModifier.SeriesData.SeriesInfo;
Given the dynamic nature of this chart, I recreate the data series every 250 ms. I have the data series bound to my view model and every 250 ms I assign the series property a new Dataseries. Could this be the reason I’m seeing this issue.
Please let me know.
Thanks,
Deepak
- deepakb1 asked 10 years ago
- You must login to post comments
Hi Deepak,
Try these two links, they provide info about our HitTest API:
// Hit Testing: Getting data values at mouse points
http://http://www.scichart.com/questions/question/add-nearest-y-value-as-annotation-when-click-on-chart/
// CoordinateCalculators: Convert data-value to pixels
http://http://www.scichart.com/questions/question/how-get-xy-coordinates-of-scichartsurface/
Best regards,
Andrew
- Andrew Burnett-Thompson answered 10 years ago
- You must login to post comments
[Comment] Hi Deepak,
It sounds like it. What is it you need from the SeriesInfo? The X and Y positions / data values? If so there may be another way to achieve this.
Let me know,
Andrew
- Andrew Burnett-Thompson answered 10 years ago
-
Andrew, I really only need to pick up the Y Value at the position of the mouse click. How can I do this ? Deepak
- You must login to post comments
Please login first to submit.