SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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

[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
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
Showing 2 results
Your Answer

Please first to submit.