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

Allow hiding legend in plots #351

Open
mturoci opened this issue Dec 3, 2020 · 5 comments · May be fixed by #358
Open

Allow hiding legend in plots #351

mturoci opened this issue Dec 3, 2020 · 5 comments · May be fixed by #358
Assignees
Labels
feature Feature request plot Related to plotting

Comments

@mturoci
Copy link
Collaborator

mturoci commented Dec 3, 2020

via @isarth23

Proposal: Add legend prop to plot_card, defaults to True.

Implementation note: chart.legend(false) is all it takes.

cc @lo5 @geomodular

@mturoci mturoci added ui Related to UI feature Feature request plot Related to plotting and removed ui Related to UI labels Dec 3, 2020
@mturoci mturoci self-assigned this Dec 7, 2020
@lo5
Copy link
Member

lo5 commented Dec 19, 2020

I'm trying to understand the motivation behind this issue - why would you want to hide the legend on a visualization?

@mturoci
Copy link
Collaborator Author

mturoci commented Dec 21, 2020

cc @isarth23

image

I know you consider this just a visual bug, but isn't legend in this case just unnecessary distraction? It is clear which bar represents what in this case (we should however solve the overflow).

In general, I would consider importance of the legend case by case, but providing flexibility to remove it when needed is a plus that folks might appreciate. However, I am by no means a data viz expert so I may be wrong on this one.

@lo5
Copy link
Member

lo5 commented Dec 21, 2020

In this particular vis, color-encoding the bars is not useful. Removing the color encoding will make the legend go away.

@isarth23
Copy link

Yeah, but it seemed nice with different colors, can be added plus to include but not necessary.

@dott1718
Copy link

I have another use case where hiding the legend is important. I am marking the items that were selected via events using different color, but I don't want them to appear in the legend as 2 groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request plot Related to plotting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants