echarts [Feature] 旭日图label文字沿着弧线分布

ubbxdtey  于 3个月前  发布在  Echarts
关注(0)|答案(5)|浏览(76)

What problem does this feature solve?

旭日图中,名称稍长,按照原先label沿着固定方向直线排列的方式,可能会很突兀。而沿着弧线会使整体看起来更和谐,并且也能容纳更多的文字。之前貌似也有人需求该功能,可惜的是当时并不能满足,不知现在能否实现。

What does the proposed API look like?

在旭日图的label配置中添加一个是否沿弧线排列即可。

evrscar2

evrscar21#

@sentimental114 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED

TITLE

The Rising Sun Chart label text is distributed along an arc

BODY

What problem does this feature solve?

In the sunburst chart, the name is slightly longer, and it may be very abrupt according to the original way of arranging the labels in a straight line along a fixed direction. Following the arc will make the whole look more harmonious and can also accommodate more text. It seems that some people have requested this function before, but unfortunately it was not satisfied at the time. I wonder if it can be implemented now.

What does the proposed API look like?

Just add whether to arrange along the arc in the label configuration of the sunburst chart.

pxyaymoc

pxyaymoc2#

Canvas/SVG don't have methods to render text along a path so I'm afraid such a feature would be hard to implement.

wwtsj6pe

wwtsj6pe3#

Canvas/Svg seems to have a textPath attribute. Can we reserve an API to define this textPath, so that the text can be distributed along the curved edge of the rising sun chart(sunburst)

pxyaymoc

pxyaymoc4#

You are welcomed to make a pull request to https://github.com/ecomfe/zrender

ilmyapht

ilmyapht5#

Okay I'll give it a try

相关问题