由于页面多图;且每一项显示的数据较多;在标签页中;每个图表容器的大小有限制;高度为230px;这时数据就会被遮挡而不能显示;怎么解决呢
配置项如下
option = {
noDataLoadingOption: {
text: '暂无数据',
effect: 'bubble',
effectOption: {
effect: {
n: 0
}
}
},
title: {
text: ' 一二三',
y: "center",
x: "center"
},
//color:colors,
tooltip: {
trigger: 'item',
position: function(a) {
a[0] += 50;
a[1] += 50;
return a
},
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
/*animation:false,*/
series: [{
label: {
normal: {
position: 'inside'
}
},
name: "一二三",
type: 'pie',
radius: ['48%', '70%'],
minAngle: 10,
startAngle: 75,
selectedMode: 'single',
avoidLabelOverlap: true, //是否启用防止标签重叠策略,默认开启
itemStyle: { //两种方式都对这是echarts2x中的
normal: {
label: {
formatter: function(params) {
var obj = params.data;
var str = obj.name + ',(' + obj.percent + '%)' + ',' + obj.value;
return str.split(",").join("\n");
},
textStyle: {
fontSize: 13,
color: '#333'
}
}
}
},
data: [{
"name": "房建",
"value": 10000096297.64,
"percent": 100,
"itemStyle": {
"normal": {
"color": "#3185c1"
}
}
}, {
"name": "土石方",
"value": 63250,
"percent": 0,
"itemStyle": {
"normal": {
"color": "#39cccc"
}
}
}, {
"name": "市政",
"value": 30000,
"percent": 0,
"itemStyle": {
"normal": {
"color": "#eec132"
}
}
}]
}]
};