我需要将x轴标签旋转45度。我所做的如下:
我添加了chart.labelRotation =45
小提琴
它不工作!
labelRotation
是categoryAxis
的属性,而不是chart的属性。因此,您需要将其应用于chart.categoryAxis
:
chart.categoryAxis.labelRotation = 45;
使用AmCharts。makeChart:
var chart = AmCharts.makeChart( chartId, {
....
....
"categoryAxis": {
"labelRotation": 45,
....
},
....
....
}