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

Grouped HorizontalBarChart should display legend by default #1224

Open
jaronheard opened this issue Sep 13, 2020 · 0 comments
Open

Grouped HorizontalBarChart should display legend by default #1224

jaronheard opened this issue Sep 13, 2020 · 0 comments

Comments

@jaronheard
Copy link
Contributor

jaronheard commented Sep 13, 2020

Is your feature request related to a problem? Please describe.
Currently, the HorizontalBarChart with the grouped chart will not display a legend unless it is passed an array of dataSeriesLabels.

Example:
The chart shown in this story requires the following dataSeriesLabel in order to display a legend.
Screen Shot 2020-09-13 at 6 45 25 PM

dataSeriesLegend: [
  {
    "category": "Poodle",
    "label": "Poodle"
  },
  {
    "category": "Bulldog",
    "label": "Bulldog"
  }
]

Otherwise, the chart will look like this:
Screen Shot 2020-09-13 at 6 48 27 PM

dataSeriesLegend: null

Describe the solution you'd like
Should populate the legend based on the values of dataSeriesKey by default.

Describe alternatives you've considered
Could keep as is, but requires extra work from component users.

Additional context
The legend component can be overridden with the legendComponent prop, so there's no need to provide an extra override to hide the legend.

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

1 participant