echarts
echarts copied to clipboard
[Bug] 饼形图当position为center时触摸其他区块显示的name跟默认name重叠
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { color: ['#4992FF', '#394F71'], tooltip: { show: false, trigger: 'item' }, legend: { bottom: '5%', left: 'center', show: false }, series: [ { name: '合格率', type: 'pie', hoverAnimation: true, radius: ['60%', '100%'], label: { show: true, position: 'center', }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' } ] } ] };
Current Behavior
我使用实例代码当我触摸其他区块时默认显示的name和我触摸的区块name发生了重叠现象
Expected Behavior
我想要在触摸其他区块时饼形图中间name只显示我触摸的区块
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
@HanQiCheng 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
[Bug] When the position of the pie chart is center, the name displayed by touching other blocks overlaps with the default name
BODY
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { color: ['#4992FF', '#394F71'], tooltip: { show: false, trigger: 'item' }, legend: { bottom: '5%', left: 'center', show: false }, series: [ { name: 'pass rate', type: 'pie', hoverAnimation: true, radius: ['60%', '100%'], label: { show: true, position: 'center', }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' } ] } ] };
Current Behavior
I use the example code. When I touch other blocks, the name displayed by default overlaps with the name of the block I touched.
Expected Behavior
I want the name in the middle of the pie chart to only display the block I touched when other blocks are touched
Environment
- OS:
-Browser:
- Framework:
Any additional comments?
No response
Why not use label.position: 'inner'
? Demo Code
You can use the emphasis
api, like this:
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: 40,
fontWeight: 'bold'
}
},
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { color: ['#4992FF', '#394F71'], tooltip: { show: false, trigger: 'item' }, legend: { bottom: '5%', left: 'center', show: false }, series: [ { name: '合格率', type: 'pie', hoverAnimation: true, radius: ['60%', '100%'], label: { show: true, position: 'center', }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' } ] } ] };
Current Behavior
我使用实例代码当我触摸其他区块时默认显示的name和我触摸的区块name发生了重叠现象
Expected Behavior
我想要在触摸其他区块时饼形图中间name只显示我触摸的区块
Environment
- OS: - Browser: - Framework:
Any additional comments?
No response
You can use the
emphasis
api, like this:label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: 40, fontWeight: 'bold' } },
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { color: ['#4992FF', '#394F71'], tooltip: { show: false, trigger: 'item' }, legend: { bottom: '5%', left: 'center', show: false }, series: [ { name: '合格率', type: 'pie', hoverAnimation: true, radius: ['60%', '100%'], label: { show: true, position: 'center', }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' } ] } ] };
Current Behavior
我使用实例代码当我触摸其他区块时默认显示的name和我触摸的区块name发生了重叠现象
Expected Behavior
我想要在触摸其他区块时饼形图中间name只显示我触摸的区块
Environment
- OS: - Browser: - Framework:
Any additional comments?
No response
You can use the
emphasis
api, like this:label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: 40, fontWeight: 'bold' } },
Version
5.4.1
Link to Minimal Reproduction
No response
Steps to Reproduce
option = { color: ['#4992FF', '#394F71'], tooltip: { show: false, trigger: 'item' }, legend: { bottom: '5%', left: 'center', show: false }, series: [ { name: '合格率', type: 'pie', hoverAnimation: true, radius: ['60%', '100%'], label: { show: true, position: 'center', }, data: [ { value: 1048, name: 'Search Engine' }, { value: 735, name: 'Direct' } ] } ] };
Current Behavior
我使用实例代码当我触摸其他区块时默认显示的name和我触摸的区块name发生了重叠现象
Expected Behavior
我想要在触摸其他区块时饼形图中间name只显示我触摸的区块
Environment
- OS: - Browser: - Framework:
Any additional comments?
No response
Although this is a good idea, it doesn't meet my needs
Why not use
label.position: 'inner'
? Demo Code
Thank you for reminding me that I have applied it to my project, but I still hope that the development team of echart can solve my problems
Has there been any progress on this issue? I had the exact same problem