Skip to content

charton API


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

Function: loadLastLayout() ​

loadLastLayout(chart, storage, options?): Promise<LastLayout | null>

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

Load the most recently updated layout from storage into the chart. Layouts that are missing or not layouts are skipped for the next newest. Resolves with its id and the loadLayout result, or null when there is none. Rejects with a not-registered ChartError on a chart without the layouts() plugin, which has a saved layout but cannot load it.

Parameters ​

chart ​

Chart

storage ​

StorageAdapter

options? ​

LayoutLoadOptions = {}

Returns ​

Promise<LastLayout | null>