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?
optionaldelayMs?:number
Defined in: packages/core/src/storage/drawings.ts:18
Wait this long after the last change before saving. Default 500.
flushTarget?
optionalflushTarget?: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?
optionalkey?: (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?
optionalonError?: (error) =>void
Defined in: packages/core/src/storage/drawings.ts:20
A load or save failed. Default logs it.
Parameters
error
unknown
Returns
void