apache / apache/superset

Option to preserve chart visibility during refresh instead of hiding the chart

Open
#34,682 9 comments 1 reaction 0 assignees View on GitHub
dashboard:refresh
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 4h
Merged PRs (30d)
664

Description

## Screenshot

Image

## Description

Currently, when a dashboard refreshes, Superset hides each chart and shows only the loading animation until the new data is rendered. On dashboards with multiple charts refreshing at different speeds, this can cause noticeable flickering and distracting visual changes, especially for users who monitor dashboards continuously.

**Are there any specific reasons for fully hiding charts during refresh beyond emphasizing the loading state and ensuring loading animation visibility?**

## Proposed Improvement
In many use cases, keeping the previous chart visible until the updated data is ready would create a more subtle, less disruptive user experience. This way, users would simply see the chart update once the refresh completes, without repeated disappear/reappear cycles. If the main concern with preserving chart visibility is ensuring that the loading animation remains noticeable, a more flexible approach could be to allow configuring the loading indicator’s position and style — for example, placing it in a specific location within the chart area (e.g. header whitespace in the chart corner), so it remains visible without interfering with the chart content. This would keep the loading feedback clear and accessible while minimizing disruption to users who are actively monitoring dashboards.

### Some things I have done
For our needs, I’ve modified the `Chart.tsx` component to call `renderChartContainer()` even during loading, overlaying the chart with the loading animation instead of replacing it. This could be considered as a potential default behavior in Superset.

However, the most flexible approach would be to make this configurable — for example, adding a checkbox in the "Edit chart" options to allow users to choose whether charts remain visible during refresh. I’ve tested this by:
1. Adding a new `CheckboxControl` in `sharedControls.tsx`
2. Accessing the checkbox control’s value from `formData` in `Chart.tsx` to control `renderChartContainer()` based on the user’s choice and loading state
3. Updating `controlPanel.tsx` for the desired chart type to include the new control

However, this currently requires applying step 3 to each chart type’s `controlPanel.tsx`. Is there a more efficient way to make this available across all chart types?

## Design input
What is the Superset team’s opinion and vision on this? If you agree this could improve UX, I’m happy to open a PR with an implementation.
@kasiazjc @rusackas @mistercrunch

Thanks in advance!
Best regards!

Contributor guide

Open the contributing guide

Research direction

Start with Chart.tsx to understand the current loading and renderChartContainer behavior, then read sharedControls.tsx and the chart-type controlPanel.tsx files mentioned in the issue. Determine how a visibility option could be exposed across chart types without duplicating setup. Done means the team-approved behavior is implemented consistently and the refresh experience is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.