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.
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.
- plotrequis{ 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.
- ticksrequis{ x: Array<IChartTick> y: Array<IChartTick> }
- Tick descriptors for X and Y primary left axis. Comes from useChart().ticks.value.
- secondaryYTicksArray<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.
- showAxisboolean
- Render the four-corner axis frame and tick labels. When false the component renders nothing.
- showGridboolean
- 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