Value axis
Live neutral value readout centered on the Y-axis. Shows mean of visible range when resting, value at crosshair when hovering. Ref-only — zero re-renders.
Primitive:
ChartAxisValueInteractive demo
Usage
import { ChartRoot, ChartAxisValue } from '@ramtt/charts'
<ChartRoot data={data} height={200}>
<ChartAxisValue format={(v) => `${Math.round(v)} W`} />
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| format | (value: number) => string | — | Optional value formatter (default: Math.round) |
| className | string | — | Class forwarded to the wrapping <g> |