Category scales share the same axis configuration as numeric charts, but support some additional properties in the axis and axis.ticks objects. The axis object has one additional property that can be used to override the data object labels for an axis:
Property |
Value |
Description |
labels |
Array of String |
An array of labels to display. Overrides any other definition for labels, including data object properties: labels, xLabels, or yLabels. |
The following code fragment shows category labels defined in three different properties. Since the single x axis contains a labels property, it will override all previous definitions:
new Chart("my-chart", type: ..., ...