Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the google chart API title and axis position and font style setting?

I am working on using the google chart api to create a scatter chart, but it seems that the position of title can only be changed to 'in' or 'out', and align to the left side. How can I change it to be centered outside of the chart? Also, how to cancel the style italic for the axis label? Thanks for your help!!

like image 570
Jiahui Guo Avatar asked Sep 09 '12 20:09

Jiahui Guo


1 Answers

For canceling the italic style on the axis titles, do something like this:

vAxis: {title: "Hours", titleTextStyle: {italic: false}},
hAxis: {title: "Month", titleTextStyle: {italic: false}},

It is an undocumented feature, but it works most of the time.

like image 141
Daniel Garcia Avatar answered Sep 16 '22 15:09

Daniel Garcia