Skip to content
EliteChart

DrawingStyle

Documentation


Documentation / @elitechart/drawings / DrawingStyle

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

Visual styling hooks for drawings. The chart resolves these from the theme at render time; per-drawing overrides ride on DrawingInstance.styleOverride.

Example

code
chart.setDrawingStyle(id, { color: '#ff8a00', lineWidth: 2, lineStyle: 'dashed' });

Properties

color

code
readonly color: string;

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


fillColor

code
readonly fillColor: string;

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


font

code
readonly font: string;

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


hitTolerance

code
readonly hitTolerance: number;

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

Pixel tolerance for hit-testing lines / edges.


lineStyle?

code
readonly optional lineStyle?: LineStyle;

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

Optional line-style override. When present on a per-drawing styleOverride, the tool's primary stroke adopts the pattern. Tools with semantic dashing (horizontal/vertical lines, Fib levels) keep their intrinsic style unless they opt in.


lineWidth

code
readonly lineWidth: number;

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


textColor

code
readonly textColor: string;

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