Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Highcharts scrollbar?

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?

like image 630
Kal Avatar asked Feb 24 '12 14:02

Kal


People also ask

How do you make a Highchart scrollable?

Re: How to make highcharts scrollable vertically in column rjs file and in its place put highstock. js file. To enable scrollbars for xAxis, put the code responsible for that inside xAxis. Also, set max parameter to 10.

What is the difference between Highcharts and Highstock?

Exactly Highstock is much better for big data sets than Highcharts. It's because it was designed for this purpose. It has built-in data grouping facility, data is blazingly fast grouped into optional groups, which fastens the process a lot. Feel free to ask any further questions!

Is Highcharts responsive?

Since Highcharts 5.0 you can create responsive charts much the same way you work with responsive web pages. A top-level option, responsive, exists in the configuration. One of the most handy options is chart. className that can be used to control the style of all other elements in Highcharts styled mode.


1 Answers

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 -->
},
like image 180
rizal Avatar answered Sep 20 '22 10:09

rizal