Stat panel shows "No data" flicker on refresh with Loki datasource

Hi community,

I’m experiencing an annoying issue with Grafana stat panels connected to Loki datasource. Every time the dashboard auto-refreshes, the panels briefly show “No data” for about half a second before displaying the correct value again. This creates a constant flickering effect that makes the dashboard look unprofessional.

Setup:

  • Datasource: Loki

  • Panel type: Stat

  • Time range: Last 2 days

  • Auto-refresh: Every 5 seconds

What’s happening:

  1. Dashboard refreshes every 5 seconds

  2. During refresh, stat panel briefly displays “No data”

  3. Then the correct value (e.g., “16”) appears again

  4. This repeats on every refresh cycle

What I need: A way to keep displaying the last known value during the refresh cycle instead of showing “No data”. The stat panel should maintain the previous value until new data arrives, rather than clearing and re-rendering on each refresh.

Is there a setting, transformation, or query configuration that can prevent this flickering behavior in stat panels with Loki datasource?

Thanks for any help!

That’s too frequent. Especially if Loki query response time is around 5 seconds.