这是我的JSON
"
chart:{
gridLineWidth: 0,
minorGridLineWidth: 0,
gridLineColor: 'transparent',
tickWidth: 0,
animation: false,
backgroundColor: 'rgb(0, 21, 41)',
style: {
color: 'white',
fontFamily: 'OpenSans'
}
},
yAxis:{
gridLineWidth: 0,
minorGridLineWidth: 0,
gridLineColor: 'transparent',
allowDecimals:true,
opposite:true,
tickWidth: 0,
labels: {
style: {
color: 'white',
fontFamily: 'OpenSans',
fontSize: '11px',
fontWeight: '600',
textAlign: 'center'
},
useHTML: true,
formatter: function() {
if (1==1) {
var num = this.value;
return '<span style=background-color:rgba(73,134,191,0.2);float:left;padding-top:2px;padding-bottom:2px;padding-right:5px;padding-left:5px;font-family:OpenSans;border-radius:50px;min-width:39px;>'+ num +'</span>';
}
}
}
},
xAxis:{
gridLineWidth: 0,
minorGridLineWidth: 0,
gridLineColor: 'transparent',
LineColor: 'transparent',
tickWidth: 0,
tickWidth: 0,
labels:{
style: {
color: 'white',
fontFamily: 'OpenSans',
fontSize: '11px',
fontWeight: '600',
textAlign: 'center'
},
useHTML: true,
formatter: function() {
if (1==1) {
var num = this.value;
return '<span style=background-color:rgba(73,134,191,0.2);float:left;padding-top:2px;padding-bottom:2px;padding-right:5px;padding-left:5px;font-family:OpenSans;border-radius:50px;min-width:39px;>'+ num +'</span>';
}
}
}
},
plotOptions:{
series:{
connectNulls: true,
marker: {
enabled:false
},
states: {
normal: {
opacity: 1
},
hover: {
enabled: true,
lineWidth: 2
}
},
lineWidth: 2,
color: {
linearGradient: { x1: 0, x2: 0, y1: 0, y2: 1 },
stops: [
[0, 'seagreen'],
[0.25, 'green'],
[0.50, 'lightgreen'],
[0.75, 'yellow'],
[1, 'red']
]
},
animation:true
}
},
series: [{
point: {
events: {
mouseOver: function(e) {
var tick = findTick(this.x, this.series.xAxis.ticks, 0);
this.selectedTick = tick;
if (tick) {
tick.label.css({
fontSize: '14px',
});
}},
mouseOut: function(e) {
if (this.selectedTick) {
this.selectedTick.label.css({
fontSize: '11px'
});
this.selectedTick = null;
}
}}},
marker: {
symbol: ""url(/NAPP_BdP/img/NAPP_BdP.Marker.png)""
}
}
]
"
这行得通,已经过测试和工作,但是我们发现了一个错误,每当结果线垂直于x轴(水平)时,它都不会画线,如果启用了标记,它将显示标记在水平结果中,但是无论如何都不会显示该线,我尝试了connectNulls = true,但是无论如何都没有工作,试图禁用/启用标记,但是也没有工作。
那么,我该如何解决这个问题?
谢谢!