Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] pie触发dispatchAction报错‘The provided double value is non-finite’ #16649

Closed
Lcyame opened this issue Mar 8, 2022 · 2 comments
Closed
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community
Milestone

Comments

@Lcyame
Copy link

Lcyame commented Mar 8, 2022

Version

5.3.1

Link to Minimal Reproduction

No response

Steps to Reproduce

option = {
	"tooltip": {
		"trigger": "item"
	},
	"series": [{
		"name": "IT资源",
		"type": "pie",
		"radius": ["50%", "65%"],
		"roseType": false,
		"data": [{
			"value": 1056,
			"name": "数据库",
			"labelLine": {
				"lineStyle": {
					"color": "#EEEC0D"
				}
			},
			"itemStyle": {
				"color": {
					"type": "radial",
					"r": 1,
					"colorStops": [{
						"offset": 0,
						"color": "#EEEC0D"
					}, {
						"offset": 1,
						"color": "rgba(238,236,13,0.2)"
					}]
				}
			}
		}, {
			"value": 1421,
			"name": "主机",
			"labelLine": {
				"lineStyle": {
					"color": "#E55125"
				}
			},
			"itemStyle": {
				"color": {
					"type": "radial",
					"r": 1,
					"colorStops": [{
						"offset": 0,
						"color": "#E55125"
					}, {
						"offset": 1,
						"color": "rgba(229,81,37,0.2)"
					}]
				}
			}
		}]
	}],
	"label": {}
}

myChart.dispatchAction({
		type: 'highlight',
		dataIndex:0
	})

Uncaught TypeError: Failed to execute 'createRadialGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.

Current Behavior

ver5.3.1:Uncaught TypeError: Failed to execute 'createRadialGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.

Expected Behavior

...

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@Lcyame Lcyame added the bug label Mar 8, 2022
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Mar 8, 2022
@Lcyame
Copy link
Author

Lcyame commented Mar 8, 2022

ver 5.2.2 is OK

@lefex
Copy link
Contributor

lefex commented Mar 9, 2022

You miss x and y property. But, we should fix this bad case . I have fixed this bug, bug not publish.

There are two ways to fix this issues:

  1. You can try as below:

image

  1. Or you can add x and y property:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community
Projects
None yet
Development

No branches or pull requests

3 participants