Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge Chart value doesn't update when jinja template filters are set #26086

Closed
3 tasks done
Anphisa opened this issue Nov 23, 2023 · 1 comment
Closed
3 tasks done

Gauge Chart value doesn't update when jinja template filters are set #26086

Anphisa opened this issue Nov 23, 2023 · 1 comment

Comments

@Anphisa
Copy link

Anphisa commented Nov 23, 2023

I have a gauge chart in my dashboard that displays one metric. I apply filters with Jinja templating to the base table. The gauge chart metric doesn't change, not even after a full refresh.

How to reproduce the bug

  1. Add a filter with jinja templating in a dataset, pseudocode similar to my scenario:
SELECT
  a.something
FROM table_A a
INNER JOIN table_B b
ON table_A.id = table_B.id
WHERE 1 = 1
{% if filter_values('val')|length %}
  AND b.val IN {{ filter_values('val')|where_in }};
{% endif %}
  1. Add a metric in dataset, e.g. COUNT(DISTINCT(something))
  2. Add a gauge chart displaying the metric
  3. Put it on a dashboard
  4. Change filter values
  5. See that gauge chart value doesn't update.

Expected results

Changed metric in gauge chart.

Actual results

Metric in gauge chart stays as if no filter was applied.

Screenshots

No filters set, gauge chart and big number chart with unfiltered metric value:
image
Filter is set (greyed/whited out, but visible that a filter value was set), big number chart updates, gauge chart doesn't:
image

Environment

(please complete the following information):

  • browser type and version: Chrome
  • superset version: 3.0.1

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@rusackas
Copy link
Member

rusackas commented Apr 8, 2024

Closing this as stale, but it's likely stale because it's hard to reproduce. Can you give us a reproducible test case using example charts/data so not as much has to be redacted? If we can make that happen, and the bug is still present in 3.1/4.0, we can revisit/reopen. Thanks!

@rusackas rusackas closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants