charton API / @chart-on/ui / index / createToolbar
Function: createToolbar()
createToolbar(
host,chart,initial):ToolbarHandle
Defined in: ui/src/toolbar.ts:239
A toolbar of initial items in host, acting on chart; items that do not fit move into a "more" menu by group and priority.
Parameters
host
HTMLElement
chart
initial
ToolbarItem[] | ToolbarOptions
Returns
Example
ts
import { builtins, createChart } from '@chart-on/core';
import { createToolbar, fullscreen, intervals, screenshot } from '@chart-on/ui';
const chart = createChart(chartEl, { plugins: builtins() });
const toolbar = createToolbar(topEl, chart, [intervals(['1m', '1h', '1d']), screenshot(), fullscreen()]);