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] How to use single visualmap controller to select multiple series with 2D dataset source #20662

Open
Justin-ZS opened this issue Jan 8, 2025 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@Justin-ZS
Copy link

Version

5.6.0

Link to Minimal Reproduction

official demo

Steps to Reproduce

To visual map colors to all bars in the demo, we have to add the same visualmap for each series.
But every visualMap has their own controller ...
Is there any way to show only one controller and control all visualmaps/bars?
Or is there other way to add only one visualMap config for all series?

Current Behavior

Multiple series need multiple but same visualmaps config.
Each visualmap config brings it's own controller

Expected Behavior

Add only one visualmap for all series.

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@Justin-ZS Justin-ZS added the bug label Jan 8, 2025
@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 Jan 8, 2025
@echarts-bot echarts-bot bot changed the title [Bug] How to use single visualmap controller to select multiple serires with 2D dataset source [Bug] How to use single visualmap controller to select multiple serires with 2D dataset source Jan 8, 2025
@Justin-ZS Justin-ZS changed the title [Bug] How to use single visualmap controller to select multiple serires with 2D dataset source [Bug] How to use single visualmap controller to select multiple series with 2D dataset source Jan 8, 2025
@MatthiasMert
Copy link

I think if you want to specify different dimensions for each series it is not possible while using one dataset.

Possible solutions are

  • using the same visualMap dimension for all series (Example)
  • dont use a dataset (Example)
  • use multiple datasets (Example)

@Justin-ZS
Copy link
Author

Justin-ZS commented Jan 9, 2025

I think if you want to specify different dimensions for each series it is not possible while using one dataset.

Possible solutions are

  • using the same visualMap dimension for all series (Example)
  • dont use a dataset (Example)
  • use multiple datasets (Example)

Yes,It doesn't look possible on current config.
The result of your first solution(using the same visualMap dimension for all series) is wrong.
The other solutions do work, but they reqiure much refactoring and splitted data may not be suitable for other uses (e.g. stack column but tooltip to show all stacked datas in the same category)

My workaround is to add the same visualmap for evert series, but only show the first visualmap controller.
When selected changes, call setOption to sync the selected to all visualmaps.
The problem is that I still can't find a way to sync the hoverLink since it doesn't emit events.

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