Flip chart axes via

26 views
Skip to first unread message

Colin Tucker

unread,
Oct 5, 2016, 11:25:48 AM10/5/16
to Google Visualization API
I am looking to generate two charts on my apps script dashboard. If I understand correctly, only one data table can be linked to any given dashboard in apps script. With that in mind, I am trying to make do with one data table that meets the needs of both of my charts. 

However, my line chart renders the chart data in the wrong order, putting my legend as the x-axis variables and my x-axis variables as my legend. Is there a way to flip these chart axes? 

It would be incredibly frustrating if I could only use one data table for a dashboard and couldn't alter the axes of the chart. 

Daniel LaLiberte

unread,
Oct 5, 2016, 7:36:30 PM10/5/16
to Google Visualization API
You can flip the orientation of the chart, so the x axis is the vertical axis, and y is horizontal.  You could set the orientation of a chart using the 'orientation' option, in the 'view' property of a ChartWrapper.  But from your description, it sounds like you really need to transpose the data, so rows become columns.  If so, we don't have an operation for doing that.  You would have to draw a chart outside of the dashboard using the transposed data, which you would have to transpose yourself as needed.

--
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 google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/c9e3dfd6-dff4-4aab-95e1-db3e2ec67a04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages