Types

Interfaces and type aliases exported by @reincharts/interactive.

import type { BrushRange, CrossEvent, CursorMode, ... } from "@reincharts/interactive";

BrushRange

Range selected with <Brush>.

Prop

Type

CrossEvent

Fired when new data crosses a line drawing (price alerts).

Prop

Type

CursorMode

Pointer mode of the chart when no drawing tool is active.

type CursorMode = "cross" | "arrow" | "eraser";

Drawing

One drawing on the chart. Plain JSON: store it, send it, load it.

Prop

Type

DrawingController

The drawing controller returned by useDrawings() / createDrawingController().

Prop

Type

DrawingControllerEvents

Prop

Type

DrawingControllerOptions

Prop

Type

DrawingControllerState

Snapshot of the controller state (immutable, safe for React).

Prop

Type

DrawingEditor

Prop

Type

DrawingLevel

A fibonacci / gann level.

Prop

Type

DrawingPoint

A drawing anchor: data x value (timestamp / number) and raw price. Survives data reloads and zoom.

Prop

Type

DrawingsJSON

Serialized drawings (toJSON / load).

Prop

Type

DrawingStyle

Visual style of a drawing. Every field is optional; tools fill in their defaults.

Prop

Type

DrawState

Render state of a drawing.

Prop

Type

EditorOptions

Options of the drawing editor (props of <Drawings>).

Prop

Type

Geometry

The drawing converted to pixels plus helpers, handed to tool draw / hitTest / handles.

Prop

Type

GeometryContext

Prop

Type

HitPart

Result of a hit test: false = miss, "body" (or true) = the drawing, a number = handle index, "remove" = a close button.

type HitPart = boolean | "body" | "remove" | number;

IconName

type IconName = keyof typeof icons;

MagnetMode

Magnet mode used while placing points.

type MagnetMode = "off" | "weak" | "strong";

NewDrawing

Input of add: a drawing without id (the pane defaults to "main").

Prop

Type

Pt

A point in pane plot pixels.

Prop

Type

StyleControl

Controls of the floating style toolbar.

type StyleControl = "color" | "width" | "dash" | "fill" | "text" | "fontSize" | "extend";

ToolDefinition

A drawing tool. Use defineTool to create custom tools.

Prop

Type

On this page