缺少Google饼图的标签

时间:2018-02-07 01:17:21

标签: javascript css charts google-visualization google-pie-chart

Google Pie Chart

我正在使用谷歌饼图来显示信息,但缺少一个标签,增加高度也不起作用。

这是我的代码

var view = new google.visualization.DataView(data);

      view.setColumns([0, 1,
                       { calc: "stringify",
                         sourceColumn: 1,
                         type: "string",
                         role: "annotation" },

                       2]);

      var options = 
      {
        title: "",
    pieSliceText: "none",
    colors: ['#6f9643','#dcc591','#9487bf','#6f9693','#9d5434','#bfe1e0',
                '#a8c08e','#a89fca','#efbfbf','#9fc4d6','#eaaa7a','#dcc591'],
        bar: {groupWidth: "80%"},
        legend: {   
        position: "labeled", 
        textStyle:{bold:true, fontSize: 11}
        },
        height: 500,
        width: 900,
        chartArea:{width:'85%',height:'80%'},
    backgroundColor: { fill:'transparent' },
        is3D:true
      };    

提前致谢!

1 个答案:

答案 0 :(得分:0)

删除此

pieSliceText: "none"

在饼图切片中查看标签

更多信息visit