apache / echarts

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

[Bug] 仪表盘设置开始角度为某一个角度时会出现显示错误 #16550

Closed ma-ting closed 8 months ago

ma-ting commented 2 years ago

Version

"echarts": "^5.2.2" "echarts-for-react": "^3.0.2",

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
  tooltip: {
    show: false,
    formatter: '{a} <br/>{b} : {c}%'
  },
  series: [
    {
      name: 'Pressure',
      type: 'gauge',
      min: 0,
      max: 36,
      startAngle: 321,
      endAngle: -39,
      center: ['50%', '70%'],
      animation: false,
      progress: {
        show: true,
        width: 2,
        itemStyle: {
          color: '#4992FF'
        }
      },
      splitNumber: 36,
      axisLine: {
        show: true,
        lineStyle: {
          color: [[1, '#4992FF']],
          width: 3
        }
      },
      axisLabel: {
        color: 'white',
        fontSize: 14,
        distance: -30,
        formatter: (value) => {
          return value === 36 ? '' : value;
        }
      },
      axisTick: {
        distance: -10,
        splitNumber: 2,
        lineStyle: {
          color: 'white'
        }
      },
      splitLine: {
        distance: -14,
        lineStyle: {
          color: 'white'
        }
      },
      pointer: {
        width: 4,
        length: '100%',
        itemStyle: {
          color: '#4992FF',
          borderColor: '#4992FF'
        }
      },
      detail: {
        show: true,
        color: 'white',
        fontSize: 15,
        offsetCenter: [0, '70%'], // 相当于仪表盘中心的偏移位置
        formatter: '航向角'
      },
      data: [
        // value为仪表盘指针指向的值
        {
          value: 23,
          name: `${23.1 * 10}°`,
          title: {
            color: 'white',
            fontSize: 22,
            offsetCenter: [0, '30%'] // 相当于仪表盘中心的偏移位置
          }
        }
      ]
    }
  ]
};

设置 startAngle321, 页面显示会出现错误 也在示例-时钟仪表盘Clock 中测试过,会出现一样的问题, 查过 echarts 的 bug 中 #14095 中曾提到过该问题,version 5.0.2 中曾修复过,但在 clock 示例中显示还是有错误。

Current Behavior

image

Expected Behavior

希望能够正常显示

Environment

- OS: Windows 10
- Browser: Chrome 78.0.3904.108
- Framework: React 16

"echarts": "^5.2.2",
"echarts-for-react": "^3.0.2",

Any additional comments?

No response

echarts-bot[bot] commented 2 years ago

@hilitterg 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 dashboard set the start angle to a certain angle, there will be a display error
ma-ting commented 2 years ago

In addition to 0 degrees, the problem also occurs when startAngle is set to 321 or 0 degrees and endAngle is set to -39 or 0 degrees

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] commented 8 months ago

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!