gui » context-menu

context-menu

[ root » gui » context-menu ]

Use the contextMenu object to customize the context menu, which appears when users right-click on an area of the chart. You can style the menu, create custom chart context menu items, and add a context menu button so that users on mobile devices can access the menu by tapping on the button. Refer to the Context Menu Tutorial for more information.




AttributeTypeDescription
backgroundColor
background-color
StringSets the background color of the object. Colors can be entered by name (e.g., "purple", "blue"), hexadecimal notation (e.g., "#666699", #33ccff"), or RGB notation (e.g., "rgb(255,0,0)", "rgb(0,0,255)")
Default Value: null
buttonObjectSets the styling for the context-menu button that will appear when a chart is viewed on mobile devices.
customItems
custom-items
Array.<Object>Sets a collection of custom-menu items on the context menu.
dockedBooleanFixes the context menu to a specified `position`.
emptyBooleanSet try to empty the contextmenu
gearObjectSets the styling for the gear icon that appears by default in the context-menu button on mobile devices.
itemObjectSets the id or style of the item.
positionStringSets the position of the contextmenu
Accepted Values: ['left', 'right']
separatorObjectStyles the line separating the context menu items