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

Context menu on point series

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

1 Reply

KC Kalaimathi Chellaiah Syncfusion Team 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. 

Live Chat Icon For mobile
Up arrow icon