Thanks a lot Andrew.

What's the syntax to specify more series to use the secondary axis, do I
have to specify them one by one, or I can do something like this:

series: {
    0,2,4: {
        type: 'bars',
        targetAxisIndex: 0
    },
    1,3,5: {
        type: 'line',
        targetAxisIndex: 1
    }
}

Thanks



On Mon, May 5, 2014 at 11:23 AM, Andrew Gallant <[email protected]>wrote:

> Yes, you can do that.  If you want to mix columns and lines, use a
> ComboChart.  In the chart options, specify the series.<series
> index>.targetAxisIndex option to target the left (axis 0) or right (axis 1)
> axes.  You can set the options for the axes by using the vAxes.<axis index>
> options.  These take the exact same sub-options as the vAxis option.
>
> series: {
>     0: {
>         type: 'bars',
>         targetAxisIndex: 0
>     },
>     1: {
>         type: 'line',
>         targetAxisIndex: 1
>     }
> },
> vAxes: {
>     0: {
>         format: '#,###'
>     },
>     1: {
>         format: '#%'
>     }
> }
>
>
> On Monday, May 5, 2014 10:59:09 AM UTC-4, Tong Sun wrote:
>>
>> Hi,
>>
>> Is it possible to add a secondary axis to a google chart?
>>
>> Basically I'm trying to do this, http://jeffprom.com/
>> 2012/09/05/add-excel-chart-percentage-differences/, i.e, adding a second
>> series of entirely different data range as line chart to an existing bar
>> chart. Is it possible with google chart?
>>
>> Thanks
>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Visualization API" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-visualization-api/KU8-KtygxVg/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to