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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Context menu on point series

Thread ID:





145621 Jul 1,2019 03:10 PM UTC Jul 2,2019 12:20 PM UTC JavaScript - EJ 2 1
Tags: Chart
Alex Siler
Asked On July 1, 2019 03:10 PM UTC

Is it possible to open a context menu at the point of the clicked series?

Kalaimathi Chellaiah [Syncfusion]
Replied On July 2, 2019 12:20 PM UTC

Hi Alex, 
Greetings from Syncfusion. 
We have analyzed your query. We can achieve your requirement using pointClick event of the chart. This event fired when we click the series point. So we have created a context menu inside of this event and set menu item target as chart container ID. Now the context menu is working fine as you expect.  We have prepared a simple sample based on your requirement. Please find below sample and code snippet, 
Code Snippet: 
let menuObj: ContextMenu; 
let menuItems: MenuItemModel[] = [ 
    text: 'Cut', 
    iconCss: 'e-cm-icons e-cut' 
    text: 'Copy', 
    iconCss: 'e-cm-icons e-copy' 
    text: 'Paste', 
    iconCss: 'e-cm-icons e-paste' 
//ContextMenu model definition  
let menuOptions: ContextMenuModel = { 
  target: '#container_svg', 
  items: menuItems, 
// To create context menu when click the point 
pointClick: (args: IPointEventArgs) => { 
    if(menuObj && !menuObj.isDestroyed) { 
    menuObj = new ContextMenu(menuOptions, '#contextmenu'); 
Hope this helps. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon