Combchart. How to map the bars to the left hand axis and the line(s) to the right had axis?

30 views
Skip to first unread message

Michael Falkson

unread,
Jan 2, 2014, 11:53:15 AM1/2/14
to google-visua...@googlegroups.com
Hello,

I'm looking for a way to use the left axis of a chart for the bars and have a different valued right axis for the line(s).

Is this possible.

Thanks

Mike

asgallant

unread,
Jan 2, 2014, 12:17:38 PM1/2/14
to google-visua...@googlegroups.com
Use the series.<series index>.targetAxisIndex option to choose which vertical axis to use for a given series.  Use the vAxes.<axis index> options to set options for each vAxis.

series: {
    0: {
        type: 'bars',
        targetAxisIndex: 0
    },
    1: {
        type: 'line',
        targetAxisIndex: 1
    }
},
vAxes: {
    0: {
        // left axis options
    },
    1: {
        // right axis options

Michael Falkson

unread,
Jan 2, 2014, 2:24:14 PM1/2/14
to google-visua...@googlegroups.com
Perfect.  Most appreciated.

Mike

Michael Falkson

unread,
Jan 2, 2014, 3:05:00 PM1/2/14
to google-visua...@googlegroups.com
Another related question: :)

How could I specify the color opacity in the following series?

         series: {
                    0: {
                    type: 'bars',
                    targetAxisIndex: 0,
                    color: 'blue'
                        },
                    1: {
                    type: 'bars',
                    targetAxisIndex: 0,
                    color: 'red'
                        },
                    2: {

asgallant

unread,
Jan 2, 2014, 3:14:53 PM1/2/14
to google-visua...@googlegroups.com
Set the dataOpacity option to control opacity for all data, or the series.<series index>.dataOpacity option to control opacity by data series.

asgallant

unread,
Jan 2, 2014, 3:18:24 PM1/2/14
to google-visua...@googlegroups.com
The opacity takes a value between 0 and 1, where 0 is completely transparent and 1 is completely opaque.

Michael Falkson

unread,
Jan 2, 2014, 3:20:07 PM1/2/14
to google-visua...@googlegroups.com
Thanks.  This worked.

However, Now I notice the legend colors are not affected.  How would I make sure the legend colors match?

Mike


--
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/qnFNCa6_-mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michael Falkson
eti Sales Support
Tel: 914.747.3030 Ext 3477
Web: http://www,etisales.com
Blog: http://www.etisales.com/blog

asgallant

unread,
Jan 6, 2014, 10:28:33 AM1/6/14
to google-visua...@googlegroups.com
The API does not support changing the legend's color opacity.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Michael Falkson

unread,
Jan 6, 2014, 10:37:48 AM1/6/14
to google-visua...@googlegroups.com
Thanks.  It' not a big deal but something that at some point I think should be catered for.

Mike


To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

asgallant

unread,
Jan 6, 2014, 11:17:10 AM1/6/14
to google-visua...@googlegroups.com
You can file a feature request to add support for it.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.



--
Michael Falkson
eti Sales Support
Tel: 914.747.3030 Ext 3477
Web: http://www,etisales.com
Blog: http://www.etisales.com/blog

--
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/qnFNCa6_-mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages