echarts labels are not rotated on "labelLine" in pie chart when alignTo ="edge" option is applied

cygmwpex  于 5个月前  发布在  Echarts
关注(0)|答案(5)|浏览(57)

Version

5.4.3

https://echarts.apache.org/examples/en/editor.html?c=pie-simple&code=PYBwLglsB2AEC8sDeAoWsDOBTAThLGAXLANprrLkWzQCGAtlsQOQCCAxuwRrAGI7B6zADRUKYAJ4gmsZiHwix6HLQAmEAK5FZAVgAMAUkXV0q2mFrEyJiklgA3WgBsNMgIx6ALAA5hNBjLMAMpYtDjsABawAKLQAOYQ0FjMsAC-ojbodo4uMgDsAMw6fnSMLAAiEDhY7GAp6Uq2Ds6uxDreeiUBLNH0tBBO9RmZ2S0yPp5dZbIAqtBQcKyqGEONWc25xAV6nf7TzABqEKpYwLBLK2mNALrD1E60AEZYTsSombDOEHHQACrALCwqjiyTWsAA9OCKAILGAmPpGg0bA9nk4ADK0CTADRgN5gmHmGQImypMSk9DXFCpADcQA

Steps to Reproduce

1.create a pie chart
2.apply align="edge"
3.and give rotate value in label or labelLayout

Current Behavior

option = {
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' }
],
label: {
alignTo: 'edge'
// rotate:50
},
labelLayout: {
rotate: 50
}
}
]
};

Expected Behavior

labels should rotate on "labelLine" in pie chart when alignTo ="edge" option is applied

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

n7taea2i

n7taea2i1#

why not use alignTo: 'labelLine' instead?

cqoc49vn

cqoc49vn2#

we have a requirement to use alignTo: 'labelLine' ,

bkkx9g8r

bkkx9g8r3#

is there any solution for it ?

l0oc07j2

l0oc07j24#

we have a requirement to use alignTo: 'labelLine' ,

...but you are using alignTo: 'edge' ...?!?

iaqfqrcu

iaqfqrcu5#

We have a requirement to align labels with the edge of the container, which we're accomplishing using the alignTo: 'edge' setting. However, we also need to adjust the label rotation. Currently, labels are rotated from the left side, but we now need them to rotate from the right side. This means the rotation should occur from the end of the label line.
please provide a solution for it

相关问题