How to change google chart title font size?

和自甴很熟 提交于 2019-12-23 06:56:23

问题


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

   var options = {
      title: 'My Daily Activities',
      'backgroundColor': 'transparent',   
      is3D: true,
    };

回答1:


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



来源:https://stackoverflow.com/questions/37176219/how-to-change-google-chart-title-font-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!