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] setOption() with normal merge resets visualMap.selected #20526

Open
ob-ARC opened this issue Nov 19, 2024 · 2 comments
Open

[Bug] setOption() with normal merge resets visualMap.selected #20526

ob-ARC opened this issue Nov 19, 2024 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@ob-ARC
Copy link

ob-ARC commented Nov 19, 2024

Version

5.5.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=calendar-heatmap&code=GYVwdgxgLglg9mABAcwKZQGowE5RAQwBsARfKfACgE9V9sBKRAbwChFEIEBnKRAEzKpEAXkQBqVBAAWdKFwB0sALap5ABzpdU1WtnGIA5AFoADAEZTZg_QDcbDt16owfEeMkzcC5ao3YtFGI0dPpm-sbmltZ27JxgPPz4VAAqMCpuAMwAbCYmiABUiABMACwFiGa5JjEO8bwC5G4A2gC6NcBwehSE6Ig-bg2oNn1pQgA8iM58w_1iogIpo4ys7OwN-OogXFIUTfark9Ky3qPyHdhKZBQ-ADSGTFSPVAC-RkwAsu-vTHx8zwZ3YBELT0G77VbvMhSM6EOCdCiQqDQ7D4FxwJQURiFSpVejglq2ezPezYdAgbBIdZ2YlwNSwBBuFYjKA9ABczHBUFp7IyJjBBx6wCg7IMEGcUFQ2ABnNQAA9hYZSDBCFREABlCVqRAAYTg4CgBiJ_L6cMIsDU7KYz2NADcYFwCIRIRaOQclDAwOy-eDLrL2Tjcsb2FAqGpUCK1DBJKgAO721DSg6dKNgBUGKTJgBeCHIhETq0FabFqcl-eD3MQWQArEb7BAiFM6JbORWzEVvQLUEKeR3VtgYMgpAreUGOKhCIQ1TBM-HEE0DPgQFyARUMi1RyiwGgRe2zFky4gYBKlBqqGzXQdEAAjTp8SUAdRgfCRXvkNYO1vBwWwABl8Ffx0tRBtjgGN2SBQgtEQYl2E_dgtH7VAuGbA4wHwFQRQQqMuCsUcQzDEUpFoKBLjUA9OFvD1BDVKgeFQJQRXrHoXDoA91nZNBMBwPAiFIcgKAMXd9zxWCWGeOwWCUKhtU8KB5AQASIEIGAIAAaxXAwsKQldQEgekkAoPx0K4ZZ7BANRBj4yhCWeQkWF06B4CQczLLIayLx6XhaV4UQrRqTzgMlbCAEFsBRVVRFaGotK4ULws2bYKCYRA0IwwwYtwxJyA49AsFwR0rIEoTrGgwl2G8-QYrcGK4qSGo4i4OAenkWFkAoKSZNkeROIAeTpJzMXkO0HSIZ0mhMFpKvHSQJT4MrEA62SpqgPr9Iobz5oaprVFa9rpKW3r-oU-ghvtR0xomqaemgVA5upIA

Steps to Reproduce

In the given example, deselect one or more ranges from the visualMap, then click into the chart to trigger the event handler which will call myChart.setOption(). See how the selected state of the visualMap is reset (also reflected by console output).

Current Behavior

Although in normal merge mode, visualMap.selected resets during setOption().

Expected Behavior

in merge mode, existing components should not change if not being merged with the given option.

Environment

- OS: Windows 10
- Browser: Firefox
- Framework:

Any additional comments?

No response

@ob-ARC ob-ARC added the bug label Nov 19, 2024
@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. labels Nov 19, 2024
@helgasoft
Copy link

not-a-bug, visualMap.selected is not included in chart configuration option API.
But it could be set by action selectDataRange. Dispatch this action after your myChart.setOption call.
📌 please close issue if problem solved.

@ob-ARC
Copy link
Author

ob-ARC commented Nov 19, 2024

Ah, so only stuff I can actually configure via setOption() is part of the merging mechanism? Good to know, I did not realize this from the documentation. Thanks!

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.
Projects
None yet
Development

No branches or pull requests

2 participants