Skip to content

charton API


charton API / @chart-on/ui / templates / DrawingTemplatesOptions

Interface: DrawingTemplatesOptions ​

Defined in: ui/src/templates.ts:37

Options for drawingTemplates and indicatorTemplates.

Properties ​

defaults? ​

optional defaults?: boolean

Defined in: ui/src/templates.ts:51

Drawings only: true adds Save as default and Reset default to the menu, which set the tool's defaults (chart.drawings.setToolDefaults) to the style fields shown, or clear them. Those stay in the layout, not in storage.


storage? ​

optional storage?: StorageAdapter

Defined in: ui/src/templates.ts:44

Where the templates are kept: the 'drawing' templates of a storage adapter, one list per tool type, or the 'indicator' ones, one list per indicator id. Default createLocalStorageAdapter(). An adapter without the template methods shows no menu.