Pre loader

Cursor Modifier Series Data is empty

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

  • You must to post comments
0
0

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

  • You must to post comments
0
0

[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

  • deepakb1
    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 to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies