Html 如何更改谷歌图表标题字体大小?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37176219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 13:15:52  来源:igfitidea点击:

How to change google chart title font size?

htmlgoogle-visualization

提问by sxxxxxxx

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

如何更改谷歌图表中标题的字体大小?

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

回答by j3ff

Use titleTextStyle in options like this

在这样的选项中使用 titleTextStyle

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

您可以在此处找到 Google Charts 的完整支持指南 https://developers.google.com/chart/interactive/docs