API / Configuration / ChartXAxis

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

Extends

Properties

Property Type Description
categories? string[] -
crosshair? AxisCrosshair Configure a crosshair that follows either the mouse pointer or the hovered point.
endOnTick? boolean Whether to force the axis to end on a tick. When enabled, the axis maximum is rounded to a "nice" value (e.g., round numbers) for better readability. This can create extra space at the end of the chart if the data maximum doesn't align with the tick. Use endOnTick: false to make the chart end closer to the data maximum. Default true for X axis and datetime Y axis, false for linear/logarithmic Y axis
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') - to the X axis when rangeSlider is used 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
rangeSlider? ChartAxisRangeSlider Configuration options for the chart range slider component. The range slider allows users to select a specific range of data to display on the chart by adjusting the slider handles. Supported only for linear, datetime, and logarithmic axes.
startOnTick? boolean Whether to force the axis to start on a tick. When enabled, the axis minimum is rounded to a "nice" value (e.g., round numbers) for better readability. This can create a visual gap at the beginning of the chart if the data minimum doesn't align with the tick. Use startOnTick: false to make the chart start exactly at the data minimum, preventing gaps at the chart start. Default true for X axis and datetime Y axis, false for linear/logarithmic Y axis
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? ChartAxisTitle -
type? ChartAxisType -
visible? boolean Whether axis, including axis title, line, ticks and labels, should be visible.