-
Notifications
You must be signed in to change notification settings - Fork 19.7k
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
feat(visualMap): able to set the 'dimension' to an array #20703
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution! Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's intuitive to use dimension: [1,2]
to represent seriesIndex: 0 -> 1, 1 -> 2, 2 -> 2
. Instead, it's more like using both dimension 1 and 2.
I think the problem of #20662 should be best solved using the third demo @MatthiasMert gave. I would suggest closing this PR unless a more solid reason is given. Thanks for your contribution anyway.
Using the same visualMap on 2d dataset requires the dataset to be splitted looks overkill. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true that using both dimension 1 and 2 is technically impossible
. Even though, it's misleading to provide such API design. Again, I would suggest using the 3rd solution or avoid using dataset in your case. Adding a new feature should take a lot of things into consideration so I would say it's not quite a good design of API unless a better plan is proposed.
Again, the suggested workaround (splitting the dataset) is unacceptable in my use case. I understand your concerns about the API design. Even if user is misled into thinking it as if you insist, I will keep this PR open until a better solutiion is proposed. |
Why is the suggested workaround (splitting the dataset) unacceptable? |
It requires huge refactoring (tooltip, axis. series and so on) and maintaining two implementations. |
I don't think it should require huge work to refactor from dataset to not. And besides, you can try with AI to help. |
Brief Information
This pull request is in the type of:
What does this PR do?
able to set the 'dimension' to an array.
item in array will be mapped to target series by index.
official demo
Fixed issues
#20662
Details
Before: What was the problem?
#20662
After: How does it behave after the fixing?
able to set the 'dimension' to an array.
item in array will be mapped to target series by index.
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information