esnet / esnet/react-timeseries-charts
Center the legend
- Dominant language
- JavaScript
- Stars
- 876
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
# 🌈Feature request
**What is this feature?**
Have the ability to center the legend. This would be particularly useful when the legend is placed independently of the chart.
**How should the feature work?**
Having a `center` option in the `align` props of the `Legend` component's API: https://software.es.net/react-timeseries-charts/#/api/charts/Legend
**Do you have examples or an idea of how it can be implemented?**
Modifying the line where the alignment strategy is chosen for the legend should be sufficient: https://github.com/esnet/react-timeseries-charts/blob/21a6c32ea8b34de35767eb0ec5e7d8b676106e48/src/components/Legend.js#L386
**Additional context**
I am particularly interested in this feature as I am trying to achieve the following presentation for the legend of this chart:

Contributor guide
Assessment
This issue has not been assessed yet.