Overview
Theaxes property provides comprehensive control over chart axes. Configure labels, ranges, scales and visibility for x, y and secondary y axes.
Axes configuration only applies to chart types that support axes (line, bar, column, combo, scatter, etc.). Pie and donut charts don’t use axes.
X-axis
The x-axis typically represents the independent variable (categories, time periods or continuous values).Label
Custom label for the x-axis. Displayed below the axis.
Visibility
Whether to hide the x-axis. When
true, the axis line, ticks and labels are hidden. The axis label is also hidden.Orientation
Flip the x-axis position (top↔bottom).
Numeric x-axis options
When the x-axis contains numeric values (not categories), additional options are available:Scale type for numeric x-axes. Use
'logarithmic' for data that spans several orders of magnitude.Minimum value for the x-axis. If not set, automatically calculated from the data.
Maximum value for the x-axis. If not set, automatically calculated from the data.
How to display ticks on numeric x-axes:
'auto'- Display all ticks'edges'- Display only the first and last ticks
Y-axis
The y-axis typically represents the dependent variable (measurements, values, quantities).Label
Custom label for the y-axis. Displayed beside the axis.
Visibility
Whether to hide the y-axis. When
true, the axis line, ticks and labels are hidden. The axis label is also hidden.Orientation
Flip the y-axis position (left↔right).
Scale type
Scale type for the y-axis:
'linear'- Standard linear scale with evenly spaced ticks'logarithmic'- Logarithmic scale, useful for data spanning multiple orders of magnitude
Range
Minimum value for the y-axis. If not set, automatically calculated from the data. Setting this to
0 is common to ensure bars start from zero.Maximum value for the y-axis. If not set, automatically calculated from the data.
Tick display
How to display ticks on the y-axis:
'auto'- Display all ticks at appropriate intervals'edges'- Display only the minimum and maximum values
Secondary y-axis (y2)
Combo charts can display two y-axes to accommodate series with different scales or units.Label
Custom label for the secondary y-axis. Only used when dual y-axes are enabled.
The secondary y-axis (y2) only supports the
label property. Other axis options (min, max, scale) are not configurable for y2.Dual y-axis mode
Whether to show two y-axes on a combo chart. When
true, the primary y-axis appears on the left and the secondary on the right (or reversed if isReversed is set).hasDualYAxis is false, all series share a single y-axis.
Swapping y-axes
For combo charts with dual y-axes, useisReversed to swap the positions:
Grid lines
Whether to show horizontal grid lines across the chart.