IChartScales
interface
Data Visualisation
Pair of pixel-mapping functions produced by useChart from the data range and viewBox size. Pure functions — safe to call from computed refs. x maps a value or category index to an SVG horizontal coordinate; y maps a numeric value to an SVG vertical coordinate.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- xrequired(value: number | string, dataIndex?: number, categoryCount?: number) => number
- Maps an X-axis value (numeric or category string) plus an optional data index and category count to an SVG horizontal pixel coordinate.
- yrequired(value: number) => number
- Maps a numeric Y value to an SVG vertical pixel coordinate using the primary left-axis scale.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Using IChartScales to project a data point onto SVG space