Open sentimental114 opened 3 weeks ago
@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. 🤗
Canvas/SVG don't have methods to render text along a path so I'm afraid such a feature would be hard to implement.
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)
You are welcomed to make a pull request to https://github.com/ecomfe/zrender
Okay I'll give it a try
Now, using rich text on labels, setting an arc-shaped font image as the background can also be achieved, but it is still too cumbersome because not only do we need to gradually confirm the position of the image, but we also need to set separate rules for each layer. For this reason, many levels of interaction have also been removed. I still hope to add this feature in the future
What problem does this feature solve?
旭日图中,名称稍长,按照原先label沿着固定方向直线排列的方式,可能会很突兀。而沿着弧线会使整体看起来更和谐,并且也能容纳更多的文字。之前貌似也有人需求该功能,可惜的是当时并不能满足,不知现在能否实现。
What does the proposed API look like?
在旭日图的label配置中添加一个是否沿弧线排列即可。