Skip to content

IExportingMenuItem

Type interface

Sources

IExportingMenuItem is an interface: it describes a shape of data and is not imported on its own.

Properties

callback

Type undefined | (menuItem: any) => any

Function to call when a "custom" item is clicked.

callbackTarget

Type any

this inside callback; the menu if not set.

element

Type HTMLAnchorElement

The item's DOM element.

exportType

Type ExportingTypes

Export type of the item: "image", "data" or "print". An item whose type is not available, such as "data" without data, is left out.

format

Type ExportingFormats

Format to export in, for a "format" item. "print" prints the chart.

label

Type undefined | string

Text of the item.

sublabel

Type undefined | string

Smaller text after the label, such as "Image".

type

Type "format" | "separator" | "custom"

Type of the item:

  • "format": exports in format when clicked.

  • "separator": a divider, with label as a heading if set.

  • "custom": calls callback when clicked.