heavyai-charting
heavyai-charting copied to clipboard
Filter Charts By Clicking Legend Item
User story
As a user, I would like to be able to click on a legend item to remove data from the chart for that legend item, so I can quickly show/hide some data series. Clicking on the same legend item again would add back the data.
Acceptance criteria
- All chart types should work the same
- Multiple data series could be toggled at the same time
- User should not be able to toggle a series when there's only one
- The line should be hidden. As a stretch goal, line should be greyed-out on legend item hover
- The y axis domain should change to the new data extent if it's not locked
- It should also work with continuous legend
- An event should be triggered that could be used to set a filter on other charts and to persist the show/hide state