Pieslice标签在谷歌饼图中不可见,如果它的比例很小,我可以让它可见吗? [英] Pieslice label is not visible in google pie chart if its proportion is small, can I make it visible?

查看:248
本文介绍了Pieslice标签在谷歌饼图中不可见,如果它的比例很小,我可以让它可见吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码片段...
在饼图中有三个饼图片,但只有两个标签可见

This is my code snippet... there is three pie slices in pie chart, but only two labels are visible

  var options = {
      is3D: true,
      fontSize: 7, 
      backgroundColor: 'transparent', 
      legend: 'none', 
      pieSliceText: 'value',
      pieSliceTextStyle: { bold: true, color:'black'}, 
      tooltip: {
          textStyle: { fontSize:  12 }
      },
      slices: {
          0: {color: '#e76442'}, 
          1:{color: '#ffc100'}, 
          2:{color: '#348be7'},
      } 
  };


推荐答案

因为没有显示数据,我的假设是第三个值太小,所以没有地方。它不会被渲染。

Because there is no data shown my assumption is that the 3rd value is too small so there is no place for it. It is not rendered at all.

一个选项是旋转饼图,因此缺少值可以获得更多的宽度来显示。例如添加选项:

One option is to rotate pie chart so missing value get more width to be displayed. For example adding option:

pieStartAngle: 90

另请参阅示例旋转饼图图表从谷歌文档。左边的图表单词'Italian'不可见。在右边的图表中,旋转后是可见的。

See also example Rotating a Pie Chart from google docs. On the left chart word 'Italian' is not visible. On the right chart it is visible after rotation.

否则,我没有看到让它可见的选项。

Otherwise I don't see option to get it visible.

这篇关于Pieslice标签在谷歌饼图中不可见,如果它的比例很小,我可以让它可见吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆