Skip to content

charton API


charton API / @chart-on/core / index / emojiTool

Variable: emojiTool ​

const emojiTool: DrawingToolDef

Defined in: packages/core/src/drawing/emoji-tool.ts:18

The emoji drawing tool: a glyph (the drawing's text, usually one emoji) centred on its point, at a fixed size in css px (fontSize) and angle (angle, degrees clockwise), so it reads the same at any zoom. While selected, a corner handle sets the size and a handle above it the angle. Not one of the built-in tools: register it to offer it.

Example ​

ts
const chart = createChart(el, { plugins: [drawingTools([...builtinTools, emojiTool])] });
chart.drawings.add({ type: 'emoji', pane: 0, points: [point], style: { fontSize: 40, angle: -15 }, text: '🚀' });