echarts icon indicating copy to clipboard operation
echarts copied to clipboard

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

Open ma-ting opened this issue 4 years ago • 3 comments

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

ma-ting avatar Feb 21 '22 06:02 ma-ting

@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

echarts-bot[bot] avatar Feb 21 '22 06:02 echarts-bot[bot]

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

ma-ting avatar Feb 21 '22 06:02 ma-ting

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] avatar Feb 23 '24 21:02 github-actions[bot]

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!

github-actions[bot] avatar Mar 01 '24 21:03 github-actions[bot]