apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.45k stars 13.73k forks source link

Single Select FIlterBox is a Must in order to make superset dashboards dynamic #5244

Closed fordhamedu closed 5 years ago

fordhamedu commented 6 years ago

Make sure these boxes are checked before submitting your issue - thank you!

Superset version

{"version": "0.25.5", "GIT_SHA": ""}

Expected results

For Filterable Tables, I expect single select to filter the charts. Multiple select defeats the whole purpose of using filter as a workaround to create a truly dynamic dashboard. Tableau's single select accomplishes this incredibly well, and even enables the single selected value to be passed on as a URL parameter in iframe embeds. Including this small fix would deliver immense value to end users.

Actual results

Select filter is a multiple select, and the charts filtered as a result provide little insight and for an end user it has no functional value.

Steps to reproduce

Filterbox widget. Select one value (single select and view the charts filtered to that value result). Next select another value on the filter box. Instead of the experience described in step 1, the misguiding multi-select behavior means a user has no selected two values with those charts display data from both. This adds confusion on accuracy of data, interrupts the workflow, and as against all things best practices for UI for a analyst user. In general, a single select option in filter box would deliver immense value for all end users, a great workaround to creating dynamic dashboards and makes the community more inclusive to those new to Superset, having experience with other BI solutions where single select on filter is just best practice, which can then even evolve into enabling single select filter on and passing parameters of the select into things like iframe url parameters

mistercrunch commented 6 years ago

I don't think it's that clear cut that people want to always filter on one and only one value in a dynamic dashboard. There's work planned up on filters that should address this, in the meantime I personally don't feel like it's super awful to select a single value in a multi select if that's what you want.

ahsanshah commented 6 years ago

Glad this is work planned up for this. Agree that having multi does not imply you cannot do single. Power users and those that "know" the data would get it. However, there are some valid use cases I see for both "single select" and more importantly "default". For instance, Multi Currency where you may have metrics that need to be constrained or perhaps weird pre-aggregated location metrics such as (0-5 miles, 0-10, 0-15). This would cause incorrect results with a multi select. These may no be common but possible.

We are able to force a Single Select variant of FilterBox.jsx and it seems to work. This is basically editing of ComponentWillMount with a onChange as well as logic to adjust OrigSelectedValues in the render for the actual FIilterbox. This seems to work except that it does not force the "initial" render.

The "Default" Value we are able to code also (e.g. First value from dropdown) but what we found is that this can break or affect the other slices which seems problematic. Perhaps this would require a different approach. Perhaps a redux related action?

Will the upcoming work address Single and Default? If so, that would be awesome. We are exploring this but far from any sort of acceptable PR and fairly new to the tech stack.

mistercrunch commented 6 years ago

I don't think there's been design work on the filtering as a dashboard construct. But we can start an issue and take input/comments for when we get there. Check out the dashboard-builder branch (from memory) to see the amazing work that @graceguo-supercat and @williaster are doing at the moment. I hear it's about to get merged in master this week.

rumbin commented 6 years ago

My 50ct: I personally appreciate the multi selects in my workflows. However, I would also love to have an option to actually require a filter to be set, yielding empty charts otherwise. This is very helpful for charts that would be very crowded when the table is processed without any filter applied. You may have a look at how plotly's dash approaches this issue...

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.