Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change google chart title font size?

How do I change the font size of my title in google chart?

   var options = {       title: 'My Daily Activities',       'backgroundColor': 'transparent',          is3D: true,     }; 
like image 367
sxxxxxxx Avatar asked May 12 '16 02:05

sxxxxxxx


People also ask

How do I get rid of the legend in my Google chart?

To hide the legend in Google Chart with JavaScript, we set the legend property to 'none' . const options = { //... legend: "none", }; to set legend to 'none' in the options object to hide the legend.


1 Answers

Use titleTextStyle in options like this

var options = {     titleTextStyle: {         color: <string>,    // any HTML string color ('red', '#cc00cc')         fontName: <string>, // i.e. 'Times New Roman'         fontSize: <number>, // 12, 18 whatever you want (don't specify px)         bold: <boolean>,    // true or false         italic: <boolean>   // true of false     } } 

You can find a complete support guide for Google Charts here https://developers.google.com/chart/interactive/docs

like image 173
j3ff Avatar answered Oct 19 '22 11:10

j3ff