Skip to content
EliteChart

DrawingInstance\<State\>

Documentation


Documentation / @elitechart/core / DrawingInstance

Defined in: drawing/types.ts:195

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: drawing/types.ts:196


locked?

code
optional locked?: boolean;

Defined in: drawing/types.ts:207

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: drawing/types.ts:198


styleOverride?

code
optional styleOverride?: Partial<DrawingStyle>;

Defined in: drawing/types.ts:200

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


tool

code
readonly tool: DrawingTool<State>;

Defined in: drawing/types.ts:197