我正在尝试使用列范围Highcharts图表创建时间轴。当我添加几个相同的事件类型时,Highcharts用苍白的线条分隔它们。
我添加了borderWidth 0;
,但它没有删除苍白的线条。
$(function () {
$('#container').highcharts({
chart: {
type: 'columnrange',
inverted: true
},
title: {
text: 'Equipment Status'
},
xAxis: {
categories: ['Status']
},
yAxis: {
type: 'datetime',
title: {
text: 'Timespan'
}
},
plotOptions: {
series: {
states: {
hover: {
enabled: false
}
}
},
columnrange: {
pointPadding: 0,
borderWidth: 0,
borderColor:'red',
groupPadding: 0,
}
},
legend: {
enabled: true
},
tooltip: {
formatter: function () {
return '<b>' + this.x + ' - ' + this.series.name + '</b><br/>' + Highcharts.dateFormat('%e %B %H:%M', this.point.low) +
' - ' + Highcharts.dateFormat('%B %e %H:%M', this.point.high) + '<br/>';
}
},
series: [{
name: 'Producing',
data: [{
x: 0,
low: Date.UTC(2013, 07, 03, 0, 0, 0),
high: Date.UTC(2013, 07, 03, 4, 0, 0)
}, {
x: 0,
low: Date.UTC(2013, 07, 03, 4, 0, 0),
high: Date.UTC(2013, 07, 03, 5, 0, 0)
}, {
x: 0,
low: Date.UTC(2013, 07, 03, 5, 0, 0),
high: Date.UTC(2013, 07, 03, 6, 0, 0)
}
]
}]
});
});
答案 0 :(得分:0)
您获得的粗条是由于所有数据集上的x:0
。当你使用它时,我认为他们都不会拥有相同的数据。例如:http://jsfiddle.net/Ardoxer/u3eWz/330/