echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] 饼形图当position为center时触摸其他区块显示的name跟默认name重叠

Open hanqicheng opened this issue 2 years ago • 6 comments

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发生了重叠现象 echart

Expected Behavior

我想要在触摸其他区块时饼形图中间name只显示我触摸的区块

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

hanqicheng avatar Dec 29 '22 04:12 hanqicheng

@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. echart

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

echarts-bot[bot] avatar Dec 29 '22 04:12 echarts-bot[bot]

Why not use label.position: 'inner' ? Demo Code image

helgasoft avatar Dec 29 '22 22:12 helgasoft

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发生了重叠现象 echart

Expected Behavior

我想要在触摸其他区块时饼形图中间name只显示我触摸的区块

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

hongdeyuan avatar Dec 30 '22 02:12 hongdeyuan

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发生了重叠现象 echart

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发生了重叠现象 echart

Expected Behavior

我想要在触摸其他区块时饼形图中间name只显示我触摸的区块

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Although this is a good idea, it doesn't meet my needs

hanqicheng avatar Jan 31 '23 06:01 hanqicheng

Why not use label.position: 'inner' ? Demo Code image

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

hanqicheng avatar Jan 31 '23 06:01 hanqicheng

Has there been any progress on this issue? I had the exact same problem

timi137137 avatar Feb 14 '24 15:02 timi137137