基本图表:
type: 'area',
https://jsfiddle.net/q3x9psdz/19/
但是当当前图表的交叉值过大时-yAxis正在展开:
plotOptions: {
series: {
threshold: 20,
}
},
xAxis: {
type: 'datetime',
tickPixelInterval: 50,
crosshair: true,
},
yAxis: {
plotLines: [{
value: 0,
width: 1,
color: '#808080'
},
{
value: 20,
color: 'coral',
dashStyle: 'shortdash',
width: 2,
}
]}
https://jsfiddle.net/q3x9psdz/14/
解决方法是使用样条或直线:
series: [{ type: 'spline', name: 'Chart', data: [[1523195126000,1],[1523195426000,3],[1523195726000,1],[1523196026000,2],[1523196326000,6],[1523196626000,5],[1523196926000,2],[1523197226000,3],[1523197526000,1]], negativeColor: true, color: '#FF4040', shadow: true }]
https://jsfiddle.net/q3x9psdz/23/
但没有区域颜色:
plotOptions: {
series: {
threshold: 2.5,
}
},
https://jsfiddle.net/q3x9psdz/21/
有任何解决方案,有彩色滤光片面积和不扩大yaxis?
将Series.SoftThreshold设置为true
。
plotOptions: {
series: {
threshold: 20,
softThreshold: true
}
},
实况示例:https://jsfiddle.net/j58bvw36/