How to change the bar chart orientation in Google Charts?

20 views
Skip to first unread message

sqrl

unread,
Sep 16, 2016, 6:34:00 PM9/16/16
to Google Visualization API


I need to draw two bar charts facing each other in one page. (The chart on the left faces right, and the one on the right faces left). 

But with Google Charts, I only managed to make both charts face right. 

Is it possible to implement? What should I do? 

Daniel LaLiberte

unread,
Sep 16, 2016, 6:52:55 PM9/16/16
to Google Visualization API
You can reverse the direction of the hAxis, or you can negate your values.

Or you can actually combine both charts into one, if they share the same hAxis values. Let me know if you are interested in this option, and I can say more.

sqrl

unread,
Sep 17, 2016, 5:38:39 PM9/17/16
to Google Visualization API
I set the direction of the hAxis to -1, but no changes. Negating the values can't make vAxis go to the right side, besides, negative values would just confuse the users. 

The two charts don't share the same hAxis/vAxis values.

I thought this should be a simple problem to solve. Just a little disappointed in google charts :/
Reply all
Reply to author
Forward
0 new messages