TinyBase logoTinyBase β

YAxisProps

The YAxisProps type describes the props that configure the y axis of a CartesianChart component.

{
  className?: string;
  title?: string;
  min?: number;
  max?: number;
  ticks?: readonly number[];
  tickCount?: number;
  tickFormatter?: (tick: number) => string;
}
TypeDescription
className?string

An optional string that will be added to the class attribute of the y-axis SVG group element.

title?string

An optional title to use for the y axis, defaulting to the y Cell Id, y series label, or a combined title when multiple series use different y Cell Ids or labels.

min?number

An optional minimum y-axis bound.

max?number

An optional maximum y-axis bound.

ticks?readonly number[]

Optional numeric tick values to use for the y axis.

tickCount?number

An optional preferred number of ticks to render on the y axis.

tickFormatter?(tick: number) => string

An optional function for formatting y-axis tick labels.

The y axis is inferred by default. Use a YAxis component child when you want to override its title, numeric bounds, tick values, tick count, tick labels, or SVG class name.

Since

v8.5.0