Page 1 of 1

ContextMenu for a SeriesPoint

Posted: Tue Mar 24, 2020 8:54 am
by ludur
Hello,

is there some easy way to show ContextMenu for a SeriesPoint, when clicking with right mouse button on it?

I am able to show ContextMenu for a whole chart (which also appears when right-clicking on the point), but for a Point, I would like different items to appear in the Context Menu.

Thanks.

Re: ContextMenu for a SeriesPoint

Posted: Thu Mar 26, 2020 3:14 pm
by ArctionKestutis
Hi,

If you set

Code: Select all

_chart.ContextMenu = _contextMenu;
then Menu will always opens on right-click on the Chart.

However, you don’t need to set Chart.ContextMenu in order to show ContextMenu. In our Demo App "Annotations" example, we just have separate object, which is open on certain event & location.
Many LightningChart objects (including series) has method IsMouseOver(), which could be used to identify object under the cursor.

All the best.