Skip to content
EliteChart

DrawingInstance\<State\>

Documentation


Documentation / @elitechart/drawings / DrawingInstance

Defined in: core/dist/index.d.ts:819

A drawing registered with a chart. Returned by chart.listDrawings() as a flattened metadata projection; the full instance is opaque.

Example

code
const di: DrawingInstance<unknown> | undefined = registry.get(id);

Type Parameters

State

State = unknown

Properties

id

code
readonly id: string;

Defined in: core/dist/index.d.ts:820


locked?

code
optional locked?: boolean;

Defined in: core/dist/index.d.ts:831

Locked drawings are visible + selectable but refuse handle-drag and body-drag. chart.removeDrawing() still removes them (matches the canonical default; an explicit "always remove locked drawings" consumer setting can gate that in future chrome work).


state

code
state: State;

Defined in: core/dist/index.d.ts:822


styleOverride?

code
optional styleOverride?: Partial<DrawingStyle>;

Defined in: core/dist/index.d.ts:824

Per-drawing style overrides. Merged on top of the chart theme defaults.


tool

code
readonly tool: DrawingTool<State>;

Defined in: core/dist/index.d.ts:821