Skip to content
EliteChart

DrawingPlugin\<State\>

Documentation


Documentation / @elitechart/core / DrawingPlugin

Defined in: plugin/types.ts:161

A drawing-tool plugin. Adopts the existing DrawingTool contract so existing tools are plugin-ready without changes.

Example

code
import { defineDrawingPlugin } from '@elitechart/core';
import { trendLineTool } from '@elitechart/drawings';
const dp: DrawingPlugin = defineDrawingPlugin(trendLineTool);
chart.registerPlugin(dp);

Extends

Type Parameters

State

State = unknown

Properties

id

code
readonly id: string;

Defined in: plugin/types.ts:54

Stable, globally unique id. Reverse-DNS or scope-prefixed recommended.

Inherited from

PluginMeta.id


kind

code
readonly kind: "drawing";

Defined in: plugin/types.ts:162

Declared plugin category.

Overrides

PluginMeta.kind


name

code
readonly name: string;

Defined in: plugin/types.ts:56

Human-readable display name.

Inherited from

PluginMeta.name


targets

code
readonly targets: {
  interfaceVersion: "1";
};

Defined in: plugin/types.ts:60

Plugin interface version the plugin targets.

interfaceVersion

code
readonly interfaceVersion: "1";

Inherited from

PluginMeta.targets


tool

code
readonly tool: DrawingTool<State>;

Defined in: plugin/types.ts:163