highcharts - Start scrollbar at the left for Highstock -
i need start scrollbar @ left instead of right highstock graph. suggestions? i've seen setextremes options i'm either not using right or doesn't need. here code graph have far.
$(function() { $('#container').highcharts({ chart: { renderto: 'container', defaultseriestype: 'column' }, title: { text: 'placed advisor' }, xaxis: { categories: ['john jenkins', 'steve smith', 'will douglas', 'dustin johnson', 'suzy abbott', 'wendy jones'], min: 2 }, yaxis: { min: 0 }, legend: { shadow: true }, plotoptions: { column: { pointpadding: 0.2, borderwidth: 0.5 } }, series: [{ name: 'unemployed', data: [100, 100, 120, 55, 35, 189]}, { name: 'placed in related', data: [80, 108, 15, 74, 48, 88]}, { name: 'placed in unrelated', data: [17, 22, 187, 70, 75, 35]}, { name: 'except', data: [10, 0, 19, 65, 25, 174]}], scrollbar: { enabled:true, barbackgroundcolor: 'lightgray', //barborderradius: 7, //barborderwidth: 0, //buttonbackgroundcolor: 'gray', //buttonborderwidth: 0, //buttonarrowcolor: 'yellow', //buttonborderradius: 0, //riflecolor: 'yellow', //trackbackgroundcolor: 'red', //trackborderwidth: 1, //trackbordercolor: 'silver', //trackborderradius: 7 } }); $('#button').click(function() { var chart = $('#container').highcharts(); chart.xaxis[0].setextremes( ); });
});
here a fiddle of have far.
you need set min
value 0 , max
(like 2).
Comments
Post a Comment