Highchart(高库存图形)在第一次加载时不显示图形线 默认范围选择器。仅当用户单击全部时,它才会显示数据。
Highcharts.stockChart('container', {
credits: {
enabled: false
},
chart: {
height: 500
},
navigator: {
xAxis: {
labels: {
style: {
color: '#000'
}
}
},
},
rangeSelector: {
selected: 1
},
yAxis: {
labels: {
formatter: function() {
return (this.value > 0 ? ' + ' : '') + this.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
},
plotLines: [{
value: 0,
width: 2,
color: 'silver'
}]
},
tooltip: {
pointFormat: '{point.tooltip}',
valueDecimals: 2,
split: true
},
title: {
text: ''
},
plotOptions: {
series: {
stacking: 'stacked',
turboThreshold: 10000
}
},
series: [{
name: 'NILESH Benefits1 Plan',
id: 'NILESH Benefits1 Plan',
type: 'line',
showInNavigator: true,
color: '',
data: ([{
x: Date.UTC(2015, 9, 8),
y: 17391107.275888,
tooltip: 'NILESH Benefits1 Plan £17,391,107'
},... (lengthy data deleted)
答案 0 :(得分:0)
这是因为您已将/var/log/apache2/error.log
设置为1(这意味着索引rangeSelector.selected
的按钮将从开始就被按下)。请将该值更改为1
(等效于5
按钮)。然后,它应该根据您的需要。
All
实时示例: http://jsfiddle.net/p8k4j3y7/
API参考: https://api.highcharts.com/highstock/rangeSelector.selected
答案 1 :(得分:0)
感谢大家的答复和贡献。我已经收到了Highchart支持人员的回复,并且由于以下错误
https://github.com/highcharts/highcharts/issues/9077
解决方法是设置
设置dataGrouping.forced为真