Skip to content

Documentation / @ripl/charts / ChartAxisItemOptions

Interface: ChartAxisItemOptions<TData> ​

Defined in: charts/src/core/options.ts:545

Options for a single axis (x or y).

Extended by ​

Type Parameters ​

Type ParameterDefault type
TDataunknown

Properties ​

PropertyTypeDescriptionDefined in
base?numberLogarithm base for a 'log' scale. Defaults to 10.charts/src/core/options.ts:569
constant?numberLinear threshold for the 'symlog' scale (region near zero treated linearly). Defaults to 1.charts/src/core/options.ts:573
exponent?numberExponent for a 'pow' scale. Defaults to 1.charts/src/core/options.ts:571
fontstringCSS font shorthand for the tick labels.charts/src/core/options.ts:549
fontColorstringColor of the tick labels.charts/src/core/options.ts:551
format?ValueFormatInputHow tick values are formatted: a built-in AxisFormatType, an Intl number-format options object, or a custom formatter.charts/src/core/options.ts:555
labelRotation?numberTick label rotation in degrees; positive tilts labels counterclockwise (like rotate(45) slanting labels up to the right). Applied to the x-axis; the label band grows to fit and fewer labels are dropped on overflow.charts/src/core/options.ts:563
max?numberExplicit upper bound of the value domain (overrides the data extent).charts/src/core/options.ts:567
min?numberExplicit lower bound of the value domain (overrides the data extent).charts/src/core/options.ts:565
nice?number | booleanExpands the value domain to round, tick-aligned bounds. true (default) nices to the tick count, a number nices to that many segments, false disables it.charts/src/core/options.ts:559
scale?AxisScaleTypeScale family for this axis. Value axes default to 'linear'. See AxisScaleType.charts/src/core/options.ts:557
ticks?numberTarget number of ticks and grid lines along the axis. Defaults to 10.charts/src/core/options.ts:561
title?stringOptional axis title drawn alongside the tick labels.charts/src/core/options.ts:553
visiblebooleanWhether the axis line, ticks, and labels are rendered.charts/src/core/options.ts:547