MouseClick event for graph background

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Posts: 61
Joined: Thu Apr 10, 2014 1:50 pm

MouseClick event for graph background

Post by jrvdboom » Wed Apr 15, 2015 7:19 am

I can detect clicks on axes, titles, series, etc. through their MouseClick events. But how can I handle events where the user clicks the graph background?

User avatar
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: MouseClick event for graph background

Post by ArctionPasi » Wed Apr 15, 2015 6:41 pm


chart.ViewXY.GetMarginsRect() reports the graph edges. By calling that in chart.MouseClick or similar event you get the info.

This approach of course doesn't suit well for purposes where you want respond to mouse only when another chart object, like axis or series, is not under the mouse.
LightningChart Support Team, PT