SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
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.