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 have a requirement that I need to have different behaviors for mouse double clicks on seperate areas of the graph.
I need to support double clicks on the following
I tried subscribing for mouse double clicks on the legend, but i never got those. I also tried to create a customlegend modifier that listened to the modifiedmousedouble click, but that seems to always get hit even when I am not double clicking the legend.
The axes seems to work good, but when I also subscribe to the surface I get 2 double click events.
Any suggestions with this?
WPF Mouse Events are subject to tunnelling and bubbling. Which means if something in the visual tree has handled an event, items further down the visual tree won’t receive the event. Please see this article for an explanation, and a workaround.
To detect what parts of a SciChartSurface were clicked, you can use our ChartModifier API. Please refer to this FAQ, which links to several other FAQs for a detailed breakdown of detecting double clicks on parts of the chart like axis, chart panel etc….
To get a click on a legend, you may need to override the legend templates. Please see this article which shows how to override the legend item template, and get a click notification on the Checkbox:
To get a click on a chart title, you are going to need to look at the e.OriginalSource or e.Source property of a WPF Mouse Event Handler. This will tell you where the click came from.
Please login first to submit.