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: ChartAxisValue

Interactive demo

Usage

import { ChartRoot, ChartAxisValue } from '@ramtt/charts'

<ChartRoot data={data} height={200}>
  <ChartAxisValue format={(v) => `${Math.round(v)} W`} />
</ChartRoot>

Props

PropTypeDefaultDescription
format(value: number) => stringOptional value formatter (default: Math.round)
classNamestringClass forwarded to the wrapping <g>