mckinsey / vizro

Vizro is a toolkit for creating modular data visualization applications.
https://vizro.readthedocs.io/en/stable/
Apache License 2.0
2.47k stars 110 forks source link

Filter Selector Dynamic Updates #565

Open mkretsch327 opened 4 days ago

mkretsch327 commented 4 days ago

Which package?

None

What's the problem this feature will solve?

Following this documentation link - I'd like to request the ability to have filter dropdown/selector values update dynamically while the filter is running.

As a hypothetical example - if I have a revenue dashboard displaying performance across a few companies, I may have dashboard with filters for Company Name (with values [Company 1, Company 2, etc]) and Business Unit Name. Currently, if I were to filter to a specific Company, The BU names list shown for the second filter would should all BU names in the dataset. Ideally, it'd update to only filter amongst the BU names in the filtered dataset.

In cases where the option cardinality is small , the current state doesn't pose much of a headache. This becomes a worse experience in higher-cardinality settings.

Describe the solution you'd like

I really like the current way of specifying filters and even options. Maybe as one potential argument options in a selector, if specifying a string you can then 'link' filters as needed?

Alternative Solutions

Have not explored many alternative options with more vanilla dash.

Additional context

https://vizro.readthedocs.io/en/stable/pages/user-guides/data/?h=filter#filter-update-limitation

Code of Conduct

lingyielia commented 4 days ago

Hello @mkretsch327 ! First of all, it's so great to see you here 😃

You are right, current default filter couldn't handle the higher-cardinality settings well. This is a feature we'd love to offer natively via Vizro Filter soon, so thanks for raising your interest in this feature. It highlights the importance of addressing this feature request.

Before we have the feature released, now you can achieve similar behavior by directly leveraging Dash. See what @petar-qb suggested in this issue: https://github.com/mckinsey/vizro/issues/180#issuecomment-1830318509

Let us know whether it works in your use case. And we will keep you updated!