ContextMenu for a SeriesPoint

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
ludur
Posts: 9
Joined: Tue Apr 09, 2019 8:35 am

ContextMenu for a SeriesPoint

Post by ludur » Tue Mar 24, 2020 8:54 am

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.

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: ContextMenu for a SeriesPoint

Post by ArctionKestutis » Thu Mar 26, 2020 3:14 pm

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.

Post Reply