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.


AttributeTypeInfo
buttonObject

Sets the styling for the context-menu button that will appear when a chart is viewed on mobile devices.

{...}

custom-items
customItems
Array

Sets a collection of custom-menu items on the context menu. Right click the chart in the demo and take notice of the "Run My JavaScript" button at the bottom of the context-menu.

[...]

dockedBoolean

To fix the position of the context menu to one side of the chart.

true | false

emptyBoolean

Empties all default context-menu items, leaving just the "About ZingChart" button.

true | false | 1 | 0

gearObject

Sets the styling for the gear icon that appears by default in the context-menu button on mobile devices.

{...}

itemObject

Sets the styling for the context-menu items.

{...}

positionString

To position the context menu button on the left or right side of the chart.

left | right