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
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.
- plotrequired{ 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.
- ticksrequired{ 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).
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
OrigamChartAxis is used internally by cartesian chart families