//Normal way of setting category
this.xAxis[0].setCategories(["category1", "category2"])
在为以下类别使用分组类别插件时,是否有类似的方法来设置类别?
categories: [{
name: "Actual",
categories: ["Q1", "Q2", "Q3"]
}, {
name: "Forecast",
categories: ["Q1", "Q2", "Q3"]
}, {
name: "Plan",
categories: ["Q1", "Q2", "Q3"]
}]
答案 0 :(得分:2)
你可以这样做:
this.xAxis[0].setCategories(
[{
name: "Actual",
categories: ["Q1", "Q2", "Q3"]
}, {
name: "Forecast",
categories: ["Q1", "Q2", "Q3"]
}, {
name: "Plan",
categories: ["Q1", "Q2", "Q3"]
}]
);