-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
fix(bar): fix borderColor hides bar color with large data #20465
Conversation
Thanks for your contribution! |
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'm not sure about if we should change like this. Is it expected to show fill color instead of stroke color in large scale bars? A reason to say NO for me is that the stoke width is a fixed width (etc. 1px) while the bar width is relatively quite small when in large scale bars, far less than 1px. So I would prefer to expect showing border color in this case.
Hi @Ovilia, thank you for your review! I believe that the expected behavior for a user is that: changing the border color should only affect the border even in large data, resulting in a bar with a distinct inner color and outer border. However in this case, since that is not possibile (like you said for very small width) with larger datasets, you end up with a single color and that can be quite messy. In this example: applying a black border: A possible solution might be to ignore user-defined colors at high data density, displaying the chart as if no borderColor is specified. This would revert to a simpler, default color scheme for clarity. And on zoom to less dense data, apply the correct property. What do you think about this? The default color is this: @nico-robert what behavior did you expect? |
For me (personal opinion), the correct behavior is the result obtained with version 5.2.1, i.e. a border color that doesn't conflict with the color of the bar when the zoom is large and data is important. |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-20465@47e5928 |
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Fixed issues
Details
Before: What was the problem?
borderColor in itemStyle overrides the color of Bar series on large data
After: How does it behave after the fixing?
reset color to default one.
Document Info
One of the following should be checked.
Misc
New Test Output
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information