如何使用Google Scripts自定义图表的图例

时间:2016-02-07 20:35:12

标签: javascript html google-apps-script

我一直试图找到答案,但我没有这样的运气。我想知道是否可以通过谷歌脚本为图表的图例添加一些自定义功能?如果是这样,你们可能会指出我如何实现这个目标的正确方向?提前谢谢。

这是我到目前为止设定的选项。

options = {'title':'Production',
                'width':1366,
                'height':768,
                'vAxis': {'format': '$#,##0.00;($#,##0.00)',
                'title': 'Money'},
                'hAxis': {'title': 'Month'}
                };

此致 Sicariuxs

1 个答案:

答案 0 :(得分:2)

以下是如何使用Google Charts自定义图表图例的示例:

 var options = {
          //sliceVisibilityThreshold: 0.01,
          chartArea:{left:10,top:0,width:'100%',height:'100%'},
          height: 300,
          legend: { position: 'right', textStyle: {fontSize: 7}},
          pieSliceText: 'none',
          colors:['#03A9F4','#0091EA']
        };