SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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.
I am using WPF with SciChart version 22.214.171.1247 and the MVVM pattern.
I am using a series of modifiers like the ZoomPanModifier in a similar manner to samples that you provide that I load from an attached behaviour.
I am adding a feature to adjust the visible range when new data points arrive that would not otherwise be visible; however, if a user pans the surface I want to detect that so I can stop adjusting the visible range.
My thinking is that I need to capture a mouse event either associated with the chart to the current modifier; however, nothing I seem to do allows me to capture a mouse event. If their is a better way I am open to that as well.
You can try this technique: http://http://www.scichart.com/questions/question/sharing-mouse-events-one-way/
Someone asked only yesterday how to prevent mouse events going from one chart to another. The solution was to override OnModifierMouseMove on the modifier in question and selectively call the base method.
It would be verbose but if you created derived types of the modifiers you are using, then overrode the OnModifierMouseDown, OnModifierMouseMove, OnModifierMouseUp events you could detect mouse on specific modifiers.
Another method – a lot simpler – you can subscribe to ((Grid)SciChartSurface.RootGrid).PreviewMouseDown and in there, stop adjusting visible range. Then subscribe to MouseDoubleClick to restore visible range adjustment.
Can you try those and let me know how you get on?
Please login first to submit.