API / Configuration / ChartAxis

Defined in: src/types/chart/axis.ts:85

Extended by

Properties

Property Type Description
categories? string[] -
crosshair? AxisCrosshair Configure a crosshair that follows either the mouse pointer or the hovered point.
grid? object The grid lines settings. Unavailable for some visualizations, such as a heatmap.
grid.enabled? boolean Enable or disable the grid lines. Default true
labels? ChartAxisLabels The axis labels show the number or category for each tick.
lineColor? string The color of the line marking the axis itself.
max? number The maximum value of the axis. If undefined the max value is automatically calculated. The value type depends on the axis scale: - For linear and logarithmic axes: numeric value - For datetime axes: timestamp (milliseconds since Unix epoch) - For category axes: index of the element in the categories array (which has been processed according to the specified order property) Note: min/max is not supported for category axes in waterfall and heatmap visualizations.
maxPadding? number Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. Does not apply for series with data normalization along on a specific axis (stacking: 'percent'). Default 0.05 for Y axis, 0.01 for X axis
min? number The minimum value of the axis. If undefined the min value is automatically calculated. The value type depends on the axis scale: - For linear and logarithmic axes: numeric value - For datetime axes: timestamp (milliseconds since Unix epoch) - For category axes: index of the element in the categories array (which has been processed according to the specified order property) Note: min/max is not supported for category axes in waterfall and heatmap visualizations.
order? "reverse" | "sortAsc" | "sortDesc" Setting the order of the axis values. It is not applied by default. the "reverse" value is needed to use the reverse order without sorting
plotBands? AxisPlotBand[] An array of colored bands stretching across the plot area marking an interval on the axis.
plotLines? AxisPlotLine[] An array of lines stretching across the plot area, marking a specific value
ticks? object -
ticks.interval? string | number Interval of the tick marks(absolute or relative to the chart area). Not applicable to categorized axis. The specified value is only a hint; the interval between ticks can be greater or less depending on the data.
ticks.pixelInterval? number Pixel interval of the tick marks. Not applicable to categorized axis. The specified value is only a hint; the interval between ticks can be greater or less depending on the data. Deprecated use interval instead
timestamps? number[] -
title? object -
title.align? ChartAxisTitleAlignment Alignment of the title.
title.margin? number The pixel distance between the axis labels or line and the title. Default 4 for horizontal axes, 8 for vertical
title.maxRowCount? number Allows limiting of the contents of a title block to the specified number of lines. Default 1
title.style? Partial<BaseTextStyle> CSS styles for the title
title.text? string -
type? ChartAxisType -
visible? boolean Whether axis, including axis title, line, ticks and labels, should be visible.