Skip to content

Interface: ToolbarHost ​

Defined in: ui/toolbar.ts:4

The subset of Plot the toolbar drives. Kept minimal to avoid an import cycle.

Properties ​

drawTools? ​

ts
optional drawTools?: {
  clear: void;
  get: string | null;
  onChange: void;
  set: void;
};

Defined in: ui/toolbar.ts:12

Optional: interactive drawing tools. Adds a tool group (trendline / hline / ray / fib / rect / clear) when present.

clear() ​

ts
clear(): void;
Returns ​

void

get() ​

ts
get(): string | null;
Returns ​

string | null

onChange() ​

ts
onChange(cb): void;
Parameters ​
ParameterType
cb(tool) => void
Returns ​

void

set() ​

ts
set(tool): void;
Parameters ​
ParameterType
toolstring | null
Returns ​

void

Methods ​

download()? ​

ts
optional download(): void;

Defined in: ui/toolbar.ts:10

Optional: download the current view as a PNG. Adds a toolbar button when present.

Returns ​

void


getMode() ​

ts
getMode(): InteractionMode;

Defined in: ui/toolbar.ts:6

Returns ​

InteractionMode


home() ​

ts
home(): void;

Defined in: ui/toolbar.ts:7

Returns ​

void


onModeChange() ​

ts
onModeChange(cb): void;

Defined in: ui/toolbar.ts:8

Parameters ​

ParameterType
cb(mode) => void

Returns ​

void


setMode() ​

ts
setMode(mode): void;

Defined in: ui/toolbar.ts:5

Parameters ​

ParameterType
modeInteractionMode

Returns ​

void

MIT licensed. WebGL2 required.