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

button

Object

Demo

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

{...}

custom-items customItems

Array

Demo

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.

[...]

docked

Boolean

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

true | false

empty

Boolean

Demo

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

true | false | 1 | 0

gear

Object

Demo

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

{...}

item

Object

Demo

Sets the styling for the context-menu items.

{...}

position

String

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

left | right