我有一个带有范围选择器6h,1d,7d和all的图表。加载图表后,您无法按下所有图表,只能按前三个图表。按1d或7d后,一切都可用。
$('#chart-ranked').highcharts({
chart: {
zoomType: 'x',
events: {
load: function () {
this.rangeSelector.clickButton(0);
}
},
height: 500
},
title: {
text: 'Player Skill Rating Progression',
x: -20
},
subtitle: {
text: 'Updated hourly',
x: -20
},
xAxis: {
type: 'datetime',
labels: {
formatter: function() {
return moment(this.value).format("YYYY-MM-DD HH:MM");
}
}
},
yAxis: {
title: {
text: 'Skill Rating'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
scrollbar: {
enabled: true
},
rangeSelector: {
enabled: true,
buttons: [{
type: 'minute',
count: 60 * 6,
text: '6h'
},{
type: 'day',
count: 1,
text: '1d'
}, {
type: 'day',
count: 7,
text: '7d'
}, {
type: 'all',
text: 'All'
}]
},
tooltip: {
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
pointFormatter: function () {
return '<tr><td style="color:' + this.color + ';padding:0;">' + this.series.name + ': </td><td style="padding:0 0 0 4px;"><strong>' + this.y + ' Skill Rating</strong></td></tr>';
},
footerFormat: '</table>',
shared: true,
useHTML: true
},
legend: {
layout: 'horizontal',
align: 'center',
borderWidth: 0
},
series: [{
name: 'Ranked Solo Duel',
data: jsonData.ranked_duel
}, {
name: 'Ranked Doubles',
data: jsonData.ranked_doubles
}, {
name: 'Ranked Solo Standard',
data: jsonData.ranked_solo_standard
}, {
name: 'Ranked Standard',
data: jsonData.ranked_standard
}],
navigation: {
buttonOptions: {
theme: {
style: {
color: '#E0E0E0'
}
}
}
},
exporting: {
buttons: {
contextButton: {
text: "Download",
symbol: null
}
},
filename: 'player_rank_progression_rating_chart',
sourceWidth: 1200,
sourceHeight: 1200
}
});
我在jsfiddle上重现了这个问题。 https://jsfiddle.net/2j4d1y20/
我不确定这是一个错误还是故意的,但我想修复或解决这个问题。