semiotic
semiotic copied to clipboard
More position options for the legend
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.
It would be nice to be able to do something like this (mockup):
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):
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.
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.
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?
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).