We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

modify chart Mouse Right click Menu

Hi,

As the pics I attached, I want to delete some menu,
chart 1 is original default value.
chart 2 is what I want to show to my customer.

What attribute I need to modify?
Thanks.



3_82a3b58d.zip

1 Reply

VK Vijayabharathi K Syncfusion Team May 26, 2011 07:38 AM UTC

Hi Hanson,

Thanks for using Syncfusion products.

We suggest you to use “Popup” event of chartContecxtMenu to customize the menu item in chart context menu. Please refer the below code snippet to achieve this,

[C#]

private void CustomContextMenu()
{
this.chartControl1.ChartContextMenu.Popup += new EventHandler(ChartContextMenu_Popup);
}
void ChartContextMenu_Popup(object sender, EventArgs e)
{
this.chartControl1.ChartContextMenu.MenuItems.RemoveAt(4);//Remove menuitem from comtext menu
this.chartControl1.ChartContextMenu.MenuItems.RemoveAt(3);
this.chartControl1.ChartContextMenu.MenuItems.RemoveAt(2);
this.chartControl1.ChartContextMenu.MenuItems.RemoveAt(1);
}

Please find the attached sample and screen shot for this requirement.

Let us know if you have any concern

Regards,
Vijayabharathi




ContextMenu_9df530da.zip

Loader.
Live Chat Icon For mobile
Up arrow icon