Re: how to add dual-axis in google chart ?

372 views
Skip to first unread message

asgallant

unread,
Oct 26, 2012, 11:07:58 AM10/26/12
to google-visua...@googlegroups.com
Set the series.<series index>.targetAxisIndex option.  Axis index 0 is the left axis, index 1 is the right axis.  Set the axis options using the vAxes.<axis index> options (each takes the same options as are available to vAxis).  Example:

series: {
    0: {
        // use the left axis for the first data series
        targetAxisIndex: 0
    },
    1: {
        // use the right axis for the second data series
        targetAxisIndex: 1
    }
},
vAxes: {
    0: {
        title: 'Left Axis'
    }
    1: {
        title: 'Right Axis'
    }
}

On Friday, October 26, 2012 3:14:48 AM UTC-4, Lei Gao wrote:
     How to get dual-axis chart in google chart ?  thanks.

Brian Briskey

unread,
Mar 18, 2013, 7:38:07 PM3/18/13
to google-visua...@googlegroups.com
How do you implement this?? 

I am learning javascript to use these charts. I just need sort of a code example. I need dual-axis and this is the only example I have found of this. 

asgallant

unread,
Mar 18, 2013, 11:07:47 PM3/18/13
to google-visua...@googlegroups.com
Here's an example for you: http://jsfiddle.net/asgallant/2Wsa6/
Reply all
Reply to author
Forward
0 new messages