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

More position options for the legend #618

Closed
dgwyer opened this issue Jan 26, 2022 · 3 comments
Closed

More position options for the legend #618

dgwyer opened this issue Jan 26, 2022 · 3 comments

Comments

@dgwyer
Copy link
Contributor

dgwyer commented Jan 26, 2022

At the moment we have two options to position the legend to the left or right of the chart area. There are plenty of times that I need the legend to be displayed (centered) above or below the chart too, such as when one of the data series labels is too long.

image 8

It would be nice to be able to do something like this (mockup):

Frame 1

While I think of it, adding the legend inside the chart area looks good too (obviously this depends on the number of series and the specific data):

image 14

Also, it would be very useful to have other settings to:

  • Control the gap between legend items. This should be applied vertically for the default legend, and horizontally when the legend orientation is set to horizontal.
  • Disable the legend title and the line drawn underneath (don't need it when displaying the legend above or below the chart).
  • Add a margin around the legend.
  • Wrap legend series nicely when displaying horizontally. If you have more than, say, 3 or 4 series then this may be needed.
@emeeks
Copy link
Member

emeeks commented Feb 5, 2022

This definitely needs to happen. I think we can offer the interior options as well, though I doubt we can do anything smart (like avoiding regions with datapoints) for a while, despite the fact that we have the capability to do it.

@dgwyer
Copy link
Contributor Author

dgwyer commented Feb 5, 2022

Manual placement of the legend inside the chart would be fine for now I think. And dynamic positioning could be looked into in the future perhaps?

@emeeks
Copy link
Member

emeeks commented Jan 29, 2023

I've evolved my thinking on legends. I think any kind of more exhaustive legend should be built 3rd party rather than built into Semiotic because of the different kinds of legends and the functionality they include (interactivity for instance).

@emeeks emeeks closed this as completed Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants