tremor
tremor copied to clipboard
Feature Request: Add ability to filter out data based on clicking legend
It can frequently be valuable to filter down data in your chart to compare certain categories against one another. I think the natural place to do such filter on many charts is in the Legend component. By providing the option to pass a function to the Legend component dashboard creators would be given the capability to define functionality to filter their data as needed.
I've created a PR in draft state as a conversation starter as this enabling this functionality will require more than a couple changes in any component that renders the legend, and may have implications regarding the connection that's expected b/w categories and data in most chart components.
Thank you @bernsno, your request makes sense to me. We will review this internally. Thanks for contributing!
I intended to open an issue to request the feature but found this one.
it's really important to have this possibility, and in all types of charts. depending on the number of categories, it is interesting to be able to compare only specific labels, selected by the user.
Thanks for the discussion! https://github.com/tremorlabs/tremor/pull/711