diferents titles for 2 y-axis

45 views
Skip to first unread message

Jose Miguel Ramírez Escobedo

unread,
Jul 18, 2012, 2:12:42 PM7/18/12
to google-visua...@googlegroups.com
hi, how can i have diferent titles for two y-axis, i have 3 axis but one is x-axis, so for this is not problem, i'm using something like this 
series:{ 
                0:{targetAxisIndex:0}, 
                1:{targetAxisIndex:1}, 
                2:{targetAxisIndex:2} 
            }

so how can i have this titles, please

asgallant

unread,
Jul 18, 2012, 2:21:21 PM7/18/12
to google-visua...@googlegroups.com
Use the vAxes option, where vAxes.0 is the left y-axis and vAxes.1 is the right y-axis:

vAxes: {
    0: {
        title: 'Left Axis'
    },
    1: {
        title: 'Right Axis'
    }
}

As an aside, setting "targetAxisIndex: 2" is essentially the same as "targetAxisIndex: 1", so your third series will also be assigned to the right axis. 

Jose Miguel Ramírez Escobedo

unread,
Jul 18, 2012, 2:31:43 PM7/18/12
to google-visua...@googlegroups.com
thank you, just a doubt, why here i used vAxes and in the documentation for customize the charts said vAxis, because i tried with vAxis and don`t work but with vAxes it works

asgallant

unread,
Jul 18, 2012, 2:34:18 PM7/18/12
to google-visua...@googlegroups.com
vAxes is used when you have more than one vAxis.

Jose Miguel Ramírez Escobedo

unread,
Jul 18, 2012, 2:42:32 PM7/18/12
to google-visua...@googlegroups.com
oooh, thank you
Reply all
Reply to author
Forward
0 new messages