Is is possible to rotate axes tick labels in amCharts 5? E.g.
I am unable to find this mentioned anywhere in the new amCharts 5 documentation. This was possible in amCharts 4.
This can be achieved by setting the rotation
property on the relevant axis-renderer's labels.template
, eg:
//...
const xAxisRenderer = am5xy.AxisRendererX.new(root, {});
xAxisRenderer.labels.template.setAll({
rotation: -45,
});
const xAxis = chart.xAxes.push(
am5xy.CategoryAxis.new(root, {
renderer: xAxisRenderer ,
categoryField: 'category-name-here',
})
);
//...
Found via: amCharts 5 demo