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
5条答案
按热度按时间pobjuy321#
@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
Any additional comments?
No response
bvpmtnay2#
Why not use
label.position: 'inner'
? Demo Codej5fpnvbx3#
You can use the
emphasis
api, like this: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
Any additional comments?
No response
lzfw57am4#
You can use the
emphasis
api, like this: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
Any additional comments?
No response
You can use the
emphasis
api, like this: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
Any additional comments?
No response
Although this is a good idea, it doesn't meet my needs
lvmkulzt5#
Why not use
label.position: 'inner'
? Demo CodeThank 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