Skip to content

charton API


charton API / @chart-on/ui / index / openDrawingSettings

Function: openDrawingSettings() ​

openDrawingSettings(chart, host, id, options?): FormDialog | null

Defined in: ui/src/drawing-settings.ts:391

Open the settings dialog of drawing id in host (the shell element, so it picks up the theme): its tool's style fields and settings, and a Visibility tab for the intervals it shows on (visibleOn). Style edits preview live; Ok commits the changed style fields and intervals with one chart.drawings.update, so one undo step, and with rememberStyle on the style fields become the tool's defaults. Cancel, Escape or closing put the drawing back. The dialog closes if the drawing is removed. Null for an unknown id.

Parameters ​

chart ​

Chart

host ​

HTMLElement

id ​

string

options? ​

DrawingSettingsOptions = {}

Returns ​

FormDialog | null