chart.contextMenu
Configuration Structure
chart: {}The contextMenu options add a right-click / long-press menu whose actions act at the exact clicked point rather than chart-wide. It needs the context-menu feature (import 'apexcharts/features/context-menu'). Built-in annotate / xline / yline items become ink-managed (they open the floating editor and undo via Rewind) when the ink feature is bundled. See the Context menu guide. It is part of the chart configuration.
enabled
falseEnable the context menu. Requires import 'apexcharts/features/context-menu'.
items
Ordered array of menu items. Entries can be built-in ids ('annotate', 'xline', 'yline', 'measure') or a custom object:
{
id: 'copy',
label: 'Copy value',
icon: '<svg>...</svg>',
onClick: (chart, { x, y, seriesIndex, dataPointIndex, clientX, clientY }) => { /* ... */ },
}
The measure item shows only when the measure tool is enabled. Defaults to ['annotate', 'xline', 'yline', 'measure'].
labels
Override the built-in item labels: { annotate, xline, yline, measure }.
noteText
'Note'Text of the annotation dropped by the built-in annotate item.
line
Shared styling for the built-in xline (vertical at the clicked x) and yline (horizontal at the clicked y) items: { text, strokeDashArray, color }. These draw lines only, never a range rectangle. With the ink feature bundled the line opens the floating editor and is draggable and undoable.