现在为了换行是用空格截断的
但是这样在hover的数据提示上也显示空格
option1 = {
title: {
text: 'Part 1',
subtext: ' 财务规划 ,绩效和控制\nFinancial Reporting ,\nPlanning,Performance\nand Control',
x: 'center',
y: 'center',
top: '36%',
textStyle: {
fontWeight: 600,
fontSize: 24,
color: '#3c4858'
},
subtextStyle: {
fontWeight: 600,
fontSize: 12,
color: '#3c4858'
}
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}"
},
legend: {
show: false,
orient: 'vertical',
x: 'left',
data: ['20%-成本管理', '20%-绩效管理', '15%-对外财务报告决策', '15%-内部控制', '30%-规划预算编制与预测']
},
series: [
{
name: 'Part1',
type: 'pie',
selectedOffset:100,
radius: ['42%', '68%'],
center: ['50%', '50%'],
itemStyle: {
normal: {
label: {
show: true,
textStyle: {color: '#3c4858', fontSize: "16"},
formatter: function (val) { //让series 中的文字进行换行
return val.name.split(" ").join("\n");
}
},
title: {
text: 'aaaa'
},
labelLine: {
show: true,
length: 6,
lineStyle: {color: '#3c4858'}
}
},
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
textColor: '#000'
}
},
data: [
{value: 20, name: '20%成本管理'},
{value: 20, name: '20%绩效管理'},
{value: 15, name: '15%对外财务报告决策'},
{value: 15, name: '15% 内部 控制'},
{value: 30, name: '30% 规划预 算编制 与预测'}
]
}
],
color: ['rgb(61,171,232)', 'rgb(95,193,215)', 'rgb(146,198,96)', 'rgb(59,175,134)', 'rgb(53,128,198)']
};
怎么解决请问
还想请问 饼图hover突出的效果能放大么 没找到参数
在tooltip.formmatter中删除空格呢?类似这样
效果: