谷歌饼图标签 [英] Google Pie Charts Label
本文介绍了谷歌饼图标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
http://j1309.hizliresim.com/1f/v/t1ux0.png
这就是我的表,我的code;
Thats my chart and my code;
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities'
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
如何才能让我的标签,这样的图片。我希望它显示的图表之外的值,
how can i make my labels like that picture. i want it shows values outside of chart
http://o1309.hizliresim.com/1f/v/t1uy7.png
推荐答案
使用您的选择:
var options = {
title: 'My Daily Activities',
legend: {position: 'labeled'}
};
点击此处了解详情:
<一href=\"https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart\">https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart
这篇关于谷歌饼图标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文