Payload of the contextmenu event (chart.on('contextmenu', ...)).

interface ContextMenuEvent {
    index: null | number;
    paneIndex: number;
    point: { x: number; y: number };
    price: null | number;
    target: ContextMenuTarget;
    time: null | number;
    preventDefault(): void;
}

Properties

index: null | number

Logical bar index under the pointer, or null off the plot.

paneIndex: number
point: { x: number; y: number }

Cursor position in container media px, for placing the menu.

price: null | number

Price under the pointer on that pane, or null off the plot.

time: null | number

UTC seconds under the pointer, or null when there is no data.

Methods

  • Suppress the browser's own menu. Call it to show your own.

    Returns void