API / Configuration / ChartYAxis
Defined in: src/core/types/chart/axis.ts:511
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. |
lineVisible? |
boolean |
Whether to display the line marking the axis itself. Default true |
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 |
Legacy maximum-side padding. On linear and datetime axes, a fraction of the value range before padding. Ignored on axes normalized with stacking: 'percent' and on X when the range slider is enabled. Datetime Y axes with explicit timestamps also ignore it. Default 0.05 for Y axis, 0.01 for X axis Deprecated On linear and datetime axes where this option adds space, use padding.max with a percentage string: maxPadding: 0.25 becomes padding: {max: '25%'}. Numbers in padding are pixels. Unlike maxPadding, padding does not extend zoomed boundaries. On logarithmic axes, migrate to percentages of the logarithmic range; the legacy direction-dependent calculation is a bug and is not supported by padding. Category axes ignore padding; remove maxPadding without a replacement. Its incidental effect on category direction is a bug and is not supported by padding. |
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 |
padding? |
ChartAxisPadding |
Extend free domain boundaries without shrinking the pixel range or changing raw data. |
plotBands? |
AxisPlotBand[] |
An array of colored bands stretching across the plot area marking an interval on the axis. |
plotIndex? |
number |
Property for splitting charts. Determines which area the axis is located in. |
plotLines? |
AxisPlotLine[] |
An array of lines stretching across the plot area, marking a specific value |
plotShapes? |
AxisPlotShape[] |
An array of custom SVG elements placed at specific axis values. |
position? |
"left" | "right" |
Axis location. |
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 |
tickMarks? |
ChartAxisTickMarks |
Small perpendicular marks on the axis line at each tick position. Hidden when the axis visible is set to false. |
ticks? |
ChartAxisTicks |
- |
timestamps? |
number[] |
- |
title? |
ChartYAxisTitle |
- |
type? |
ChartAxisType |
- |
visible? |
boolean |
Whether axis, including axis title, line, tick marks, and labels, should be visible. |
Previous
Next