修改echarts中title提示框的样式(大小,位置)
let option = {
tooltip: {
name: '占比',
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)', //提示框的内容
position: function(p){ //提示框的位置,随鼠标hover的位置进行改变
return [p[0] + 10,p[1] - 10]
},
extraCssText: 'width:180px;height:60px' //提示框的大小
},
y: 'bottom',
legend: {
data: this.tradeByTypeList.map(function (e) { return e.projectTypeName }),
y: 'center',
x: '50%',
orient: 'right',
itemHeight: 18,
itemWidth: 18,
icon: "circle",
textStyle: {
color: '#fff'
}
},