var assetTotalChar = echarts.init(document.getElementById('assetTotalId'));
var assetTotalOption = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
legend: {
orient: 'vertical',
right: 30,
data: ['房产', '林产', '土地', '水产', '其他'],
formatter: function(data) {
var i = _this.list[inx].count / _this.assetTotal;
inx++;
return data + " " + (i * 100 + "").substr(0, 4) + "%";
}
},
series: [
{
name: '资产类型',
type: 'pie',
radius: ['60%', '80%'],
center: ['30%','50%'], //第一个百分比是左右移动,50%居中,越小越靠左
把echarts饼状图在div中移动位置
最新推荐文章于 2024-04-29 20:29:46 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)