Dynamic Scaling / Zoom

67 views
Skip to first unread message

Marcin

unread,
Feb 27, 2012, 11:20:34 AM2/27/12
to Google Visualization API
Dear Sirs,


I am trying to visualize data with a widespread value range.
Currently, I use the line chart. Some lines fluctuate around 20000,
others around 100. As you might guess, the lines with smaller values
are barely visible. I do not want to normalize my absolute values. Is
there any way to implement a dynamic y-axis or access a zoom? Would
other chart types fit my purposes?



Regards, Marcin.

asgallant

unread,
Feb 27, 2012, 12:44:35 PM2/27/12
to google-visua...@googlegroups.com
In what sense do you mean 'dynamic'?

You can set the vAxis.logScale option to true, which will make the vertical axis a log scale, which may help you.  It is not appropriate for all situations, though.

Marcin

unread,
Feb 28, 2012, 6:38:52 AM2/28/12
to Google Visualization API
'dynamic' = a possibility to change the range of the y axis.

So if you want to take a closer look on lines with smaller values, you
adjust y-axis to 0 - 100,
if you want inspect lines with higher values you set it to 0- 100000
(loosing details on the smaller values).
This adjustment could be done by a button, scrollbar etc...

On 27 Feb., 18:44, asgallant <drew_gall...@abtassoc.com> wrote:
> In what sense do you mean 'dynamic'?
>
> You can set the vAxis.logScale option to true, which will make the vertical
> axis a log scale, which *may* help you.  It is not appropriate for all

asgallant

unread,
Feb 28, 2012, 10:08:39 AM2/28/12
to google-visua...@googlegroups.com
Ok, you can do something like that.  One way would be to hook an event handler to a button and pass a boolean variable to the chart drawing function which dictates whether the chart should be drawn with the viewWindowMode and viewWindow options set to restrict the visible portion of the chart.  See an example here: http://jsfiddle.net/rRn7S/ 
Reply all
Reply to author
Forward
0 new messages