PHP:gChartPHP - 向饼图添加可见值
我正在使用 http://code.google.com/p/gchartphp/ 中的 gchart php 包装器。这是任何使用它的人都会遇到的问题。
您能否清晰地显示构成饼图切片的值?
<?php
$piChart = new gPieChart();
$piChart->setDimensions(650,300);
$piChart->addDataSet(array_values($type));
$piChart->setLabels(array_keys($type));
$piChart->setColors(array("F26134", "F1F1F1","FFC7A8","E6E6E6","171717"));
$piChart->setTitle("All Tickets by Issue Type");
?>
<img src="<?php print $piChart->getUrl(); ?>" />
是否有可能每个切片都显示这种格式 - “标签 (15)”
I'm using the gchart php wrapper from http://code.google.com/p/gchartphp/. This is a question for anyone out there using it.
Can you visibly display the values that make up slices of a pie chart?
<?php
$piChart = new gPieChart();
$piChart->setDimensions(650,300);
$piChart->addDataSet(array_values($type));
$piChart->setLabels(array_keys($type));
$piChart->setColors(array("F26134", "F1F1F1","FFC7A8","E6E6E6","171717"));
$piChart->setTitle("All Tickets by Issue Type");
?>
<img src="<?php print $piChart->getUrl(); ?>" />
Is it possible that for each slice it shows this sort of format - "label (15)"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以随时修改标签,使其符合您想要的格式。例如,这会将您的标签格式化为“名称(值)”格式:
You can always modify your labels so that they fit in the format you want. For example, this will format your label into the format "Name (Value)" :