SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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); //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.
[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,
Try these two links, they provide info about our HitTest API:
// Hit Testing: Getting data values at mouse points
// CoordinateCalculators: Convert data-value to pixels
Please login first to submit.