更改时间序列时需要更改轴,在图表v3中可以吗?因此,当我选择的团队A时,显示y轴0,而选择团队2时显示y轴1。
echarts.init(this.$refs.chart).setOption({
baseOption: {
timeline: {
axisType: "category",
data: ["Team A", "Team B"]
},
xAxis: {
type: "value",
boundaryGap: [0, 0.01]
},
yAxis: [
{
type: "category",
data: ["A", "B", "C", "D", "E"],
axisLabel: { interval: 0 }
},
{
type: "category",
data: ["BC", "CC", "FF", "RR", "HH"],
axisLabel: { interval: 0 },
}
]
},
options: [
{
series: [
{
name: "Billed",
type: "bar",
data: [20, 20, 30, 40, 50]
},
]
},
{
series: [
{
name: "Billed",
type: "bar",
data: [120, 20, 30, 40, 50]
},
]
}
]
});