Skip to content

charton API


charton API / @chart-on/core / index / PerSymbolDrawingsOptions

Interface: PerSymbolDrawingsOptions ​

Defined in: packages/core/src/storage/drawings.ts:14

Options for perSymbolDrawings: the storage key per symbol, the save delay, error handling, and the flush-on-leave target.

Properties ​

delayMs? ​

optional delayMs?: number

Defined in: packages/core/src/storage/drawings.ts:18

Wait this long after the last change before saving. Default 500.


flushTarget? ​

optional flushTarget?: EventTarget | null

Defined in: packages/core/src/storage/drawings.ts:22

Where to listen for pagehide, which saves a pending change at once. Default globalThis; null turns it off.


key? ​

optional key?: (symbol) => string

Defined in: packages/core/src/storage/drawings.ts:16

Storage key for a symbol id. Default the symbol id itself; add a layout id to keep drawings per layout and symbol.

Parameters ​

symbol ​

string

Returns ​

string


onError? ​

optional onError?: (error) => void

Defined in: packages/core/src/storage/drawings.ts:20

A load or save failed. Default logs it.

Parameters ​

error ​

unknown

Returns ​

void