IChartAxisProps

interface
Chart

Props for OrigamChartAxis — the cartesian-only axes, grid and tick-labels block. Expects pre-computed tick arrays and plot corners from useChart and paints them. No data coupling.

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.

plot
requis
{ x0: number y0: number x1: number y1: number cx: number cy: number }
Pixel coordinates of the plotting area four corners. Comes verbatim from useChart().plot.value.
ticks
requis
{ x: Array<IChartTick> y: Array<IChartTick> }
Tick descriptors for X and Y primary left axis. Comes from useChart().ticks.value.
secondaryYTicks
Array<IChartTick>
Tick descriptors for the secondary right Y axis. When provided a second vertical axis is rendered on the right edge of the plot area.
showAxis
boolean
Render the four-corner axis frame and tick labels. When false the component renders nothing.
showGrid
boolean
Render horizontal grid lines under the plot.
xAxisFormat
(value: string | number) => string
Formatter applied to X-axis tick labels. Defaults to String(value).
yAxisFormat
(value: number) => string
Formatter applied to Y-axis tick labels. Defaults to String(value).
secondaryYAxisFormat
(value: number) => string
Formatter applied to the secondary right Y-axis tick labels. Falls back to yAxisFormat, then String(value).

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

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

OrigamChartAxis is used internally by cartesian chart families

vue