如何启用Highcharts滚动条? [英] How to enable Highcharts scrollbar?
本文介绍了如何启用Highcharts滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
滚动条:{
enabled:true
}
但它没有用。
我试过使用highcharts .js与highstocks ...一起也没用。
我做错了什么?
解决方案
如果你的代码仍然无效,你可以尝试改变它:
< script type =text / javascriptsrc =js / highcharts.js>< / script>
用这个:
< script type =text / javascriptsrc =https://code.highcharts.com/stock/highstock.js>< / script>
,您可以添加:
滚动条:{
启用:true
},
最后,您可以添加此数据以查看您想要查看的数据点数,例如min:6:
xAxis:{
categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep', '十月','十一月','十二月'],
分钟:6 <! - 看这个 - >
},
I tried doing the
scrollbar: {
enabled: true
}
But it didnt work.
I tried using the highcharts.js that comes with highstocks.. that did not work either. Am I doing something wrong?
解决方案
If your code still doesn't work, you could try changing this :
<script type="text/javascript" src="js/highcharts.js"></script>
with this :
<script type="text/javascript" src="https://code.highcharts.com/stock/highstock.js"></script>
and you can add this :
scrollbar: {
enabled: true
},
finally, you can add this for how many data points you want to view at a time, example " min: 6 " :
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
min: 6 <!-- LOOK at this -->
},
这篇关于如何启用Highcharts滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文