Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the initial range for AMCharts ScrollBar

I have implemented a serial chart using AMCharts but have more columns than can be realistically shown in a window. To reduce the amount drawn, I have added a ChartsScrollBar which does the trick, but initially it selects all the data. Does anyone know how to set the initial zoom for the scroll bar?

I've written a JSFiddle to explain the problem - http://jsfiddle.net/Wd3GM/

I'm trying to get the 'zoom bar' to show less than four item on startup.

like image 465
tonycoupland Avatar asked Sep 25 '12 13:09

tonycoupland


1 Answers

You should listen fot "init" event and then use one of the available zoom methods. Here is modified fiddle: http://jsfiddle.net/Wd3GM/1/

like image 123
zeroin Avatar answered Oct 11 '22 16:10

zeroin