Skip to content

[Bug] How to use single visualmap controller to select multiple series with 2D dataset source  #20662

Closed

Description

@Justin-ZS

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

Activity

  1. added
    en
    pending
    on Jan 8, 2025
  2. 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[/+] on Jan 8, 2025
  3. 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 [/+] on Jan 8, 2025
  4. MatthiasMert commented on Jan 8, 2025

    @MatthiasMert

    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)
  5. Justin-ZS commented on Jan 9, 2025

    @Justin-ZS
    ContributorAuthor

    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 every 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenpending

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions