Get StartedComponentsStylingThemingMath & Science
MCP

Charts

Grid & Axes

Axes, grid and reference lines are props of every cartesian chart. CartesianGrid and ChartAxis are exported for custom SVG.

Markdown

Import

tsx
import { CartesianGrid, ChartAxis } from "@indoku/ui"

Examples

Custom tick formatting

yTickFormat and xTickFormat.

$0k$50k$100k$150k$200k$250k$300kJANFEBMARAPRMAYJUN

Multiple axes

A right axis for series with axis: right.

0501001502002503000%10%20%30%40%50%JanFebMarAprMayJun

Reference lines

Horizontal guides with labels.

TargetBreak-even050100150200250300JanFebMarAprMayJun

No grid or axes

Props

Shared props

PropTypeDefaultDescription
showGrid / showAxesbooleantrueToggle grid lines and axes.
referenceLines{ value; label?; color?; axis?; dashed? }[]–Guides.
yTickFormat / rightTickFormat(v: number) => string–Y tick labels.
xTickFormat(label: string, i: number) => string–X tick labels.

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev