apache / echarts

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

极坐标系大小改变后坐标轴消失 #12711

Closed cysgbrlc closed 2 years ago

cysgbrlc commented 4 years ago

Version

4.8.0

Steps to reproduce

option = {
  "angleAxis": {
    "type": "value",
    "show": true,
    "startAngle": 90,
    "axisLine": {
      "lineStyle": {
        "color": "rgb(0, 0, 0)",
        "width": "1"
      }
    },
    "axisLabel": {
      "fontSize": "12"
    },
    "splitLine": {
      "lineStyle": {},
      "show": false
    }
  },
  "radiusAxis": {
    "type": "category",
    "data": [
      "田谙",
      "吕欢悦",
      "冯丽丽",
      "周诚",
      "彭博",
      "刘明",
      "廖保",
      "佘凤",
      "彭伟",
      "邓惠"
    ],
    "z": 10,
    "show": true,
    "axisLine": {
      "lineStyle": {
        "color": "rgb(0, 0, 0)",
        "width": "1"
      }
    },
    "axisLabel": {
      "interval": 0,
      "rotate": 0,
      "fontSize": "12"
    },
    "splitLine": {
      "lineStyle": {
        "color": "rgb(204, 204, 204)",
        "width": "1",
        "type": "solid"
      },
      "show": true
    }
  },
  "polar": {
    "radius": "75%"
  },
  "series": [
    {
      "type": "bar",
      "coordinateSystem": "polar",
      "data": [
        23,
        21,
        20,
        20,
        20,
        19,
        19,
        18,
        18,
        18
      ],
      "stack": "sum",
      "itemStyle": {
        "normal": {
          "color": "#3155FD"
        }
      },
      "label": {
        "normal": {
          "show": false,
          "fontSize": 12,
          "position": "outside",
          "mode": "all"
        }
      }
    },

  ],

};

What is expected?

希望两个轴都出现网格线

What is actually happening?

径向轴消失 (如果上述代码没有出现这个问题,可以修改radius的大小,无论是Number类型还是百分比,都会出现这个问题,但是每次出现的时候radius的值可能不一样) 报错内容:Uncaught DOMException: Failed to execute 'arc' on 'CanvasRenderingContext2D': The radius provided (-1.77636e-15) is negative.

echarts-bot[bot] commented 4 years ago

Hi! We've received your issue and please be patient to get responded. 🎉 The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

susiwen8 commented 4 years ago

https://github.com/apache/incubator-echarts/blob/master/src/coord/Axis.js#L341

Calculate tick position(coord) might get negative value

github-actions[bot] commented 2 years 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 2 years 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!