[英]Highstock is only showing series when user zooms in
我遇到了一个高图异常问题。 我正在使用图表绘制具有多个系列的图表。 每个系列的得分都在100以上。 这是生成图表的代码。
$('#chart').highcharts('StockChart', {
chart: {
zoomType: 'x',
alignTicks: false,
backgroundColor: 'rgba(255, 255, 255, 0.1)'
},
title: {
text: 'Google SERP Chart'
},
credits: {
enabled: false
},
rangeSelector: {
buttons: [{
type: 'hour',
count: 1,
text: '1h'
}, {
type: 'day',
count: 1,
text: '1d'
}, {
type: 'month',
count: 1,
text: '1m'
}, {
type: 'year',
count: 1,
text: '1y'
}, {
type: 'all',
text: 'All'
}],
inputEnabled: false, // it supports only days
selected: 4 // all
},
xAxis: {
type: 'datetime',
title: {
text: null
},
lineWidth: 2,
minRange: 3600 * 1000,
labels: {
formatter: function () {
return Highcharts.dateFormat('%a %d %b', this.value);
}
}
},
yAxis: {
tickInterval: 1,
title: {
text: 'Ranking Position'
}
},
series: series
});
这是我得到的图。 请注意,仅绘制了一个系列,而未绘制其他系列。 我一直在尝试做这样的事情http://www.highcharts.com/stock/demo/compare可能是因为图表上有很多点吗? 我尝试进行dataGrouping,但这没有用。
任何想法可能是什么原因造成的?
这是一个JSFiddle复制问题
好吧,我想通了。 我不得不将groupingWidthPixels设置得更高。 这是小提琴修复程序。
series: {
dataGrouping: {
groupPixelWidth: 50
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.