python lable文本换行_echarts label的换行问题

现在为了换行是用空格截断的

但是这样在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}
{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突出的效果能放大么 没找到参数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值