![](https://box.kancloud.cn/ebd43c5bbaf291f3c90e736dca5e1439_595x427.gif)
[运行一下](http://www.shouce.ren/study/api/s/7108)
~~~
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>图形展示</title>
</head>
<body>
<div class="detail-section">
<div id="canvas">
</div>
</div>
<script src="http://g.tbcdn.cn/bui/acharts/1.0.32/acharts-min.js"></script>
<!-- https://g.alicdn.com/bui/acharts/1.0.29/acharts-min.js -->
<script type="text/javascript">
var chart = new AChart({
theme : AChart.Theme.SmoothBase,
id : 'canvas',
width : 950,
height : 500,
plotCfg : {
margin : [50,50,100]
},
tooltip : {
pointRenderer : function(point){
return (point.percent * 100).toFixed(2)+ '%';
}
},
seriesOptions : {
pieCfg : {
allowPointSelect : true, //允许选中
labels : {
distance : 40,
label : {
},
renderer : function(value,item){
return value + ' ' + (item.point.percent * 100).toFixed(2) + '%';
}
}
}
},
legend : null,
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['test',1],
['test',1],
['test',1],
['test',1],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true
},
['Safari', 8.5],
['test',1],
['test',1],
['test',1],
['test',1],
['Opera', 6.2],
['test',1],
['test',1],
['test',1],
['test',1],
['Others', 0.7]
]
}]
});
chart.render();
</script>
</body>
</html>
~~~