CategoryAxis.labels
configurationThe axis labels configuration.
categoryAxis.labels
ObjectThe background color of the labels. Accepts a valid CSS color string, including hex and rgb.
The border of the labels.
The text color of the labels. Accepts a valid CSS color string, including hex and rgb.
The culture to use when formatting date values. See the globalization overview for more information.
The format used to display labels for date category axis.
The {0} placeholder represents the category value.
The chart will choose the appropriate format for the current categoryAxis.baseUnit. Setting the categoryAxis.labels.format option will override the date formats.
See also: kendo.format.
Not supported for radar charts. Use categoryAxis.labels.format instead.
categoryAxis.labels.font
StringThe font style of the labels. Accepts a valid CSS color string, for example "20px 'Courier New'".
Default: "12px Arial,Helvetica,sans-serif"
The format used to display the labels. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.
Default: "{0}"
categoryAxis.labels.margin
Number|ObjectThe margin of the labels. A numeric value will set all margins.
Default: 0
categoryAxis.labels.mirror
BooleanIf set to true the chart will mirror the axis labels and ticks. If the labels are normally on the left side of the axis, mirroring the axis will render them to the right.
Default: false
categoryAxis.labels.padding
Object|NumberThe padding of the labels. A numeric value will set all paddings.
Default: 0
The position of the axis labels. By default, labels are positioned next to the axis.
- When
positionis set toend, the labels are placed at the end of the crossing axis—
typically, at the top or right end of the Chart unless the crossing axis was reversed.
- When
positionis set tostart, the labels are placed at the start of the crossing axis—
typically, at the left or bottom end of the Chart unless the crossing axis was reversed.
Default: "onAxis"
categoryAxis.labels.rotation
Number|String|ObjectThe rotation angle of the labels. By default the labels are not rotated. Can be set to "auto" if the axis is horizontal in which case the labels will be rotated only if the slot size is not sufficient for the entire labels.
Default: 0
categoryAxis.labels.skip
NumberThe number of labels to skip. By default no labels are skipped.
Default: 0
categoryAxis.labels.step
NumberThe label rendering step - render every n-th label. By default every label is rendered.
Default: 1
categoryAxis.labels.template
String|FunctionThe template which renders the labels.
The fields which can be used in the template are:
- value - the category value
- dataItem - the data item, in case a field has been specified. If the category does not have a corresponding item in the data then an empty object will be passed.
- format - the default format of the label
- culture - the default culture (if set) on the label
- index - the 0-based index of the current label
- count - the total number of labels on the axis
The text can be split into multiple lines by using line feed characters ("\n").
categoryAxis.labels.visible
BooleanIf set to true the chart will display the category axis labels. By default the category axis labels are visible.
Default: true
categoryAxis.labels.visual
FunctionA function that can be used to create a custom visual for the labels. The available argument fields are:
- createVisual - a function that can be used to get the default visual.
- culture - the default culture (if set) on the label
- dataItem - the data item, in case a field has been specified
- format - the default format of the label
- options - the label options.
- rect - the
kendo.geometry.Rectthat defines where the visual should be rendered. - sender - the chart instance (may be undefined).
- text - the label text.
- value - the category value