Functions
Functions exported by @reincharts/annotations.
import { addShape, fromEdge, indexOf, ... } from "@reincharts/annotations";addShape
Adds a marker shape of size s centered at (cx, cy) to a path.
function addShape(p: Path2D, shape: AnnotationShape, cx: number, cy: number, s: number): voidfromEdge
Resolves a pixel coordinate: negative values count from the far edge.
function fromEdge(v: number, size: number): numberindexOf
Index of the datum nearest to a data x value, or -1.
function indexOf(engine: ChartEngine, x: DataX): numberlogicalOf
Logical x of a data x value (works in index and linear modes, extrapolates beyond the data).
function logicalOf(engine: ChartEngine, x: DataX): numberpixelX
Plot-relative pixel x of a data x value.
function pixelX(engine: ChartEngine, x: DataX): numbersvgPath
Parsed (cached) Path2D of an SVG path string.
function svgPath(d: string): Path2D