apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.18k stars 19.61k forks source link

How can I display curved labels in a pie/doughnut chart? #18389

Open Deepikapariyani opened 1 year ago

Deepikapariyani commented 1 year ago

What problem does this feature solve?

Hi, I want to use the curved labels for pie charts, I found an existing issue with the exact requirements the link for the problem is https://github.com/apache/echarts/issues/13616 Please help me with this and tell me if it is possible not to add curved labels to pie charts.

What does the proposed API look like?

label: { position: "inner", fontSize: 14, rotate: 'auto' }, labelLine: { show: false, }, data: [{ value: 1,name:"Richard" }], color: { image: "https://picsum.photos/200/300", },

DMOAbove commented 1 month ago

Just letting you know that amCharts has this feature: https://www.amcharts.com/docs/v4/tutorials/curved-pie-chart-labels/ https://www.amcharts.com/putting-labels-on-a-path-bending-circular-labels-and-more-in-amcharts-4-1-2/

Hoping to see it on echarts.

jdfergason commented 1 month ago

James Alford has a nice write up on how to draw text along a circular path in a canvas: https://html5graphics.blogspot.com

Also this stack overflow answer shows drawing text along a bezier curve: https://stackoverflow.com/a/26368169