Highcharts 5.x.x
我在一系列数据上设置区域以停止在值0处绘制实线。 如果未定义yAxis.min和yAxis.max属性,则此方法正常工作,但在设置这两个属性后,区域将被忽略并显示实线。
切换评论yAxis配置。 Example
Highcharts.chart('container', {
yAxis: { min: 0, max: 100 },
xAxis: { type: 'datetime' },
series: [
{
data: [
[
1499249640000,
0.003
],
[
1499249700000,
1.9205
],
[
1499249760000,
1.9611
],
[
1499249820000,
1.928
],
[
1499249880000,
0.943
],
[
1499249940000,
0.944
],
[
1499250000000,
0.952
],
[
1499250060000,
0.044
],
[
1499250120000,
0.961
]
],
type: 'area'
},{
zones: [{
value: 0.01,
color: 'rgb(255, 255, 255, 0)'
}],
data: [
[
1499249640000,
0
],
[
1499249700000,
0
],
[
1499249760000,
1.9611
],
[
1499249820000,
0
],
[
1499249880000,
0.943
],
[
1499249940000,
0
],
[
1499250000000,
0
],
[
1499250060000,
0
],
[
1499250120000,
0
]
],
type: 'line'
}]
});