-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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 missing legend in Bar chart #362
Merged
plouc
merged 2 commits into
plouc:master
from
AhyoungRyu:fix/missing-legends-in-bar-chart
Dec 2, 2018
Merged
Fix missing legend in Bar chart #362
plouc
merged 2 commits into
plouc:master
from
AhyoungRyu:fix/missing-legends-in-bar-chart
Dec 2, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AhyoungRyu
commented
Nov 30, 2018
packages/bar/src/Bar.js
Outdated
@@ -152,22 +153,23 @@ const Bar = props => { | |||
targetKey: 'data.fill', | |||
}) | |||
|
|||
const legendDataForKeys = result.bars | |||
.filter(bar => bar.data.index === 0) | |||
const legendDataForKeys = uniqBy(result.bars |
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.
If I don't wrap this \w uniqBy
then duplicated legends will be generated
This was referenced Dec 2, 2018
awesome - when will this fix be published? |
Yeah I also wondered too ;) |
Great stuff!
…On Mon, 10 Dec 2018 at 22:37, Justin Stahlman ***@***.***> wrote:
I saw this was finally fixed with v0.52.0!
[image: capture d ecran 2018-12-10 a 17 37 06]
<https://user-images.githubusercontent.com/972804/49766102-3c37ee00-fca2-11e8-8727-08f59efad1d8.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#362 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKT5VS5EP_mR2-Xc68wFUISRK1HwAIErks5u3uIzgaJpZM4Y7ByY>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another trial to fix #111 or #218
So the problem that I aim to fix here is, if some keys have
0
as value in first column, it doesn't generate legend at all even if other columns have non-zero value.Related conversation is also in #128 which is a first trial to fix this issue. I saw #219 as well and I understand there might be more cases we can improve.
But I think many ppl including me, this missing legend with zero value in 1st column issue is more urgent I think.
tl; dr
Before
After
Also applied in Canvas