Open clavidk opened 2 weeks ago
Hey @clavidk,
I'm here to help you with your Superset issue. I'm a bot designed to assist you with bugs, questions, and contributions while you wait for a human maintainer. Let's tackle this together!
The issue you're experiencing with dashboard-level filters not applying to some mixed charts (combo line + bar charts with a primary and secondary y-axis) is likely due to the adhoc_filters
and adhoc_filters_b
parameters having a comparator
set to "No filter". This configuration means that the chart is not set up to apply any date range filter by default.
To resolve this, ensure that the comparator
values in both adhoc_filters
and adhoc_filters_b
are set to accept the date range filter from the dashboard. Here is an example configuration:
adhoc_filters:
- clause: WHERE
subject: order_date
operator: TEMPORAL_RANGE
comparator: No filter
expressionType: SIMPLE
adhoc_filters_b:
- clause: WHERE
subject: order_date
operator: TEMPORAL_RANGE
comparator: No filter
expressionType: SIMPLE
Additionally, the transformProps
function in the superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
file handles the transformation of chart properties, including the application of filters. Ensuring that the filterState
and queriesData
are correctly processed in this function can help in applying the dashboard-level date range filter to mixed charts [[1]](https://github.com/apache/superset/blob/master/superset/examples/configs/charts/Featured Charts/Mixed.yaml)[2].
If the issue persists, you might want to check for any recent updates or changes in the Superset codebase that address the application of dashboard-level filters to mixed charts. Recent updates have improved the dashboard native filter feature, which provides a way to apply and manipulate filters over many charts at the dashboard level, including mixed charts [3][4][5][6].
To continue talking to Dosu, mention @dosu.
Ah edit: it seems like query B is not inheriting the dashboard level filters: Query B ^ date filter says no filter
Whereas Query A inherits the dashboard filter:
Bug description
In mixed charts, query B does not seem to inherit default dashboard-level filters sometimes...
How to reproduce the bug
Hard to reproduce consistently but:
2023-11-01
toNow
.However, query B does not seem to have inherited the dashboard level filter.
What I expect: All charts are filtered to date ranges from 2023-11-01 to Now. All queries in mixed chart have inherited the dashboard-level filters into its filter section.
What I see: My chart I created after my dashboard filter shows all date ranges (not filtered)
Screenshots/recordings
See above
Superset version
master / latest-dev
Python version
I don't know
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist