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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

x
requis
(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.
y
requis
(value: number) => number
Maps a numeric Y value to an SVG vertical pixel coordinate using the primary left-axis scale.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Using IChartScales to project a data point onto SVG space

typescript