Pie (and other) charts with label going outside of canvas
问题简述 (One-line summary)
Pie charts with sections with long name have the labels that overlap / go out of the canvas (so no more visible)
版本及环境 (Version & Environment)
- ECharts 版本 3.2.3:
- Chrome 52.0.2743.116 (64-bit):
- MAC OS-X El Capitan 10.11.6 (OS Version):
重现步骤 (Steps to reproduce)
- Create a pie chart with several sections with long labels (PROBLEM)
- Reduce the page size and reload (Same Problem and often overlap)
期望结果 (Expected behaviour)
The labels should stay visible even when they are too long.
可能哪里有问题 (What went wrong)
The labels are not visible and often overlap
ECharts配置项 (ECharts option)
scope.distributionEvent = {
identity: $echarts.generateInstanceIdentity(),
dimension: '10:4',
config: {
tooltip: {
trigger: 'item',
formatter: "{b} : {c} ({d}%)",
zlevel: 2,
z: 100
},
series: [
{
name: "Event distribution",
type: 'pie',
radius: ['60%', '70%'],
center: ['50%', '55%'],
itemStyle : {
normal : {
label : {
show : true
},
labelLine : {
show : true,
length: 5
}
}
},
data: [{"name":"New investment","value":6},{"name":"Merger and Acquisition","value":9},{"name":"Bankruptcy","value":3},{"name":"New business relation","value":8},{"name":"Official resignations and appointments","value":1},{"name":"End of activity","value":1},{"name":"New market","value":2},{"name":"New product","value":3},{"name":"New unit","value":1}]
}
]
}
};
其他信息 (Other comments)

same question
Indeed it is a problem.
But \n can be added to label.
Does it temporarily solve the problem in you case?
See http://gallery.echartsjs.com/editor.html?c=xryc4E9Xa&v=2
@100pah Thanks! That's a reasonable solution for me!
@100pah but the corresponding legend MUST also contain \n, which is not elegant.
The "/n" help but is not a concrete solution.
See what happend when too much data and "\n"

I agree. This is something the library should handle on its own on the first render and whenever the window gets resized, otherwise there will be \n's when they aren't needed or some will be missing when needed.
I have the same question.
This is still a problem.
Are there any updates on this?
Any updates on this one?
Any solution for this?
Any updates
Hi, since this feature is required frequently, we put it in our priority list and will dive into it.
I met the same problem in a pie chart.
same issue here.. mainly on mobile...
Not only on pie charts..
Same problem. Any solutions ?
Same problem as well
I also have this issue. Is the team still trying to resolve this bug?
+1
are we accepting pull requests on this issue?