apache / echarts

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

[Bug] The pie chart is set at the same time Series.label.fontsize and Series.emPhasis.label.fontsize. When the mouse moves to the graphic, it will cause rendering abnormalities #17867

Closed Femoon closed 2 years ago

Femoon commented 2 years ago

Version

5.4.0

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
  color: ['#FFBF53', '#04B1C2', '#F07474', '#C55784', '#9A5FB3'],
  legend: {
    show: true,
    data: [
      '江苏省',
      '内蒙古自治区',
      '青海省',
      '湖南省',
      '山东省',
      '安徽省',
      '云南省',
    ],
  },
  series: [
    {
      type: 'pie',
      data: [
        {
          name: '江苏省',
          value: '1111'
        },
        {
          name: '内蒙古自治区',
          value: '2222'
        },
        {
          name: '青海省',
          value: '1121'
        },
        {
          name: '湖南省',
          value: '3456'
        },
        {
          name: '山东省',
          value: '5678'
        },
        {
          name: '安徽省',
          value: '8789'
        },
        {
          name: '云南省',
          value: '600'
        },
      ],
      label: {
        show: true,
        fontSize: '10',
      },
      emphasis: {
        label: {
          show: true,
           fontSize: '20',
        }
      }
    }
  ],
};

Move the mouse to the graphic, display highlight label

Current Behavior

The pie chart is set at the same time series.label.fontsize and Series.emPhasis.label.fontsize. The highlight label when the mouse moves to the graphic is abnormally enlarged. This behavior seems to only appear after the version of 5.2.2

image

Expected Behavior

The pie chart is set at the same time series.label.fontsize and Series.emPhasis.label.fontsize. The highlight label can be displayed normally

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

echarts-bot[bot] commented 2 years ago

@Femoon 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
**BODY** ### Version 5.4.0 ### Link to Minimal Reproduction _No response_ ### Steps to Reproduce ```` option = { color: ['#FFBF53', '#04B1C2', '#F07474', '#C55784', '#9A5FB3'], legend: { show: true, data: [ 'Jiangsu Province', 'Inner Mongolia Autonomous Region', 'Qinghai Province', 'Hunan Province', 'Shandong Province', 'Anhui Province', 'Yunnan Province', ], }, series: [ { type: 'pie', data: [ { name: 'Jiangsu Province', value: '1111' }, { name: 'Inner Mongolia Autonomous Region', value: '2222' }, { name: 'Qinghai Province', value: '1121' }, { name: 'Hunan Province', value: '3456' }, { name: 'Shandong Province', value: '5678' }, { name: 'Anhui Province', value: '8789' }, { name: 'Yunnan Province', value: '600' }, ], label: { show: true, fontSize: '10', }, emphasis: { label: { show: true, fontSize: '20', } } } ], }; ```` Move the mouse to the graphic, display highlight label ### Current Behavior The pie chart is set at the same time series.label.fontsize and Series.emPhasis.label.fontsize. The highlight label when the mouse moves to the graphic is abnormally enlarged. This behavior seems to only appear after the version of 5.2.2 image ### Expected Behavior The pie chart is set at the same time series.label.fontsize and Series.emPhasis.label.fontsize. The highlight label can be displayed normally ### Environment ````markdown - OS: - Browser: - Framework: ```` ### Any additional comments? _No response_
Femoon commented 2 years ago

Find the reason, the fontsize attribute should be a number