[{
x: "日期一",
y: [10, 20]
}, {
x: "日期二",
y: [15, 25]
}]
其中,x 表示范围条对应的横坐标,y 表示范围条对应的数值范围。 2. 如果上述数据格式没有问题,则可以尝试设置范围条的样式参数,例如:
chart: {
type: 'rangeBar',
height: 350,
toolbar: {
show: false
},
sparkline: {
enabled: true
}
},
plotOptions: {
bar: {
horizontal: true,
rangeBarGroupRows: true,
dataLabels: {
hideOverflowingLabels: false
}
}
}
其中,rangeBarGroupRows 表示范围条是否按照行进行分组显示,dataLabels 表示是否显示数据标签。