echarts [Bug] rich align not work

thigvfpy  于 4个月前  发布在  Echarts
关注(0)|答案(3)|浏览(108)

Version

5.5.0

option = { title: { text: 'Referer of a Website', subtext: 'Fake Data', left: 'center' }, tooltip: { trigger: 'item' }, textStyle: { rich: { orgname: { fontSize: 12, width: 100, align:'right' }, count: { fontSize: 12, verticalAlign: 'top', align: 'center', color: '#597FF3', padding: [0, 0, 0, 15], } } }, legend: { orient: 'vertical', left: 'left', formatter:(name) => { const arr = [ {orgname|${name}} , {count|100} , ]; return arr.join(''); } }, series: [ { name: 'Access From', type: 'pie', radius: '50%', data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' }, { value: 580, name: 'Email' }, { value: 484, name: 'Union Ads' }, { value: 300, name: 'Video Ads' } ], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] };

Steps to Reproduce

Just run it directly

Current Behavior

Expected Behavior

Display text to the right

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

a6b3iqyw

a6b3iqyw1#

yes, second rich format spoils the width of the first. Otherwise alignment works - Demo

ee7vknir

ee7vknir2#

Thank you for your answer,But if I have to use a style for the second rich text,the first align not work

o8x7eapl

o8x7eapl3#

and i tried textAlign instead of align,Still not working

相关问题