user6789930
user6789930

Reputation:

Scrollbar for y-axis is not showing in highcharts?

I am unable to view my y-axis scroll bar, i have enable it in y-axis but still unable to view it see bellow code

yAxis: {
            scrollbar: {
                enabled: true,
                showFull: true
            },
            alternateGridColor: '#FDFFD5',
            title: {
                text: 'Voltage (V)'
            }

        },

Here is the JsFiddle link which i am following

Any help would be highly appreciated

Upvotes: 1

Views: 905

Answers (2)

Klandathu
Klandathu

Reputation: 1

Highcharts doesn't not support scrollbars.

http://www.highcharts.com/docs/chart-concepts/scrollbar

You can set a fixed height or width to the chart and wrap into a div width overflow-y:auto, it's not the same thing but it approximates it.

Try this fiddle: http://jsfiddle.net/fj6d2/3076/

var chart = new Highcharts.Chart({

    chart: {
        renderTo: 'container',
        type:'bar',
    },

    xAxis: {
       categories: ['CITY1', 'CITY2','CITY3','CITY4'],
        min:2,
    },
     yAxis: {
              title: {
            text: 'Total fruit consumption'
        },
    },
     plotOptions: {
        series: {
             grouping: false,
            stacking: 'normal'
        }
    },
    legend: {
        verticalAlign: 'top',
        y: 100,
        align: 'right'
    },

    scrollbar: {
        enabled: true
    },

    series: [{
         name: 'Q1',
        data: [50, 70,0,35]
    }, {
   name: 'Q2',
        data: [20, 0,50,0]
    }, {
      name: 'Q3',
        data: [0, 0,40,20]
    },{
      name: 'Q4',
        data: [0, 30,0,20]
    }]
});

Upvotes: 0

user6789930
user6789930

Reputation:

I was using old version for highstock Just update it to 4.2.6 and bingo your work is done :)

Upvotes: 2

Related Questions