Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Charts yaxis higher values displayed lower

I am looking for a way to display rankings across time, using Google Charts.

(this is the same question as here, but this time using Google Charts instead of Highcharts)

Is there a way to display rankings in a "user-friendly way", by which I mean: with the #1 ranking being at the top of the chart, and the last ranking being at the bottom.

I wish to use the line charts.

like image 533
Timothée HENRY Avatar asked Nov 23 '11 11:11

Timothée HENRY


People also ask

How do you change the width of a bar in a Google chart?

Right-click on any column inside your chart. Select 'Format data series'. Drag the slider under the 'Gap width' to the right to make the columns thinner and to the left to make the columns wider.

Is Google Charts deprecated?

While the dynamic and interactive Google Charts are actively maintained, we officially deprecated the static Google Image Charts way back in 2012. This gives us the right to turn it off without notice, which may happen soon.


1 Answers

Ok, I found the option:

vAxis: {direction: -1} will reverse the y Axis

hAxis: {direction: -1} will reverse the x Axis

chart.draw(data, {vAxis: {direction: -1}, width: 400, height: 240, title: 'Rank'});
like image 189
Timothée HENRY Avatar answered Oct 18 '22 14:10

Timothée HENRY