GitHub user dosubot[bot] added a comment to the discussion: Superset charts are 
integrated with PlayWright. All charts and data on the page render completely 
without any unexpected errors before screenshotting. However, there are 
instances where the data is 0 and the chart is empty. What could be the 
problem? I am using C# and Superset version 4.0.1.

<!-- Answer -->
A few things can cause Superset charts to show as empty or with zero data even 
when everything appears to render fine with Playwright. The most common cause 
is a data type mismatch: if your query returns numeric values as strings 
instead of numbers, Superset charts may render as empty or only show NULL 
values. You can check this in SQL Lab—make sure your metrics/values are 
numeric, not string types. Fixing the data type in your query or database 
should resolve this for most chart types 
[(source)](https://github.com/apache/superset/issues/33174).

If your data is truly zero, Superset will render an empty chart by design; 
Playwright just waits for rendering and doesn't alter the data 
[(source)](https://github.com/apache/superset/blob/master/superset/utils/webdriver.py).
 Also, confirm the issue isn't specific to a certain chart type or dataset by 
testing with different charts and data sources.

For Playwright automation, ensure you wait for the dashboard and all chart 
containers to be visible, all loading spinners to disappear, and add a short 
delay (1–2 seconds) for chart animations to finish before taking screenshots 
[(source)](https://github.com/apache/superset/discussions/36845).

If you still see empty charts, check Superset permissions and configuration to 
make sure data visibility isn't restricted, and review logs or browser console 
for subtle errors. If you can share the chart type, data source, and a sample 
query result, I can help dig deeper.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/eca63ee2-22c0-4ea2-9675-b1405761f718?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=A%20few%20things%20can%20cause%20Superset%20charts%20to%20show%20as%20empty%20or%20with%20zero%20data%20even%20when%20everything%20appears%20to%20render%20fine%20with%20Playwright.%20The%20most%20common%20cause%20is%20a%20data%20type%20mismatch%3A%20if%20your%20query%20returns%20numeric%20values%20as%20strings%20instead%20of%20numbers%2C%20Superset%20charts%20may%20render%20as%20empty%20or%20only%20show%20NULL%20values.%20You%20can%20check%20this%20in%20SQL%20Lab%E2%80%94make%20sure%20your%20metrics/values%20are%20numeric%2C%20not%20string%20types.%20Fixing%20the%20data%20type%20in%20your%20query%20or%20database%20should%20resolve%20this%20for%20most%20chart%20types%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/33174%29.%0A%0AIf%2
 
0your%20data%20is%20truly%20zero%2C%20Superset%20will%20render%20an%20empty%20chart%20by%20design%3B%20Playwright%20just%20waits%20for%20rendering%20and%20doesn%27t%20alter%20the%20data%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/blob/master/superset/utils/webdriver.py%29.%20Also%2C%20confirm%20the%20issue%20isn%27t%20specific%20to%20a%20certain%20chart%20type%20or%20dataset%20by%20testing%20with%20different%20charts%20and%20data%20sources.%0A%0AFor%20Playwright%20automation%2C%20ensure%20you%20wait%20for%20the%20dashboard%20and%20all%20chart%20containers%20to%20be%20visible%2C%20all%20loading%20spinners%20to%20disappear%2C%20and%20add%20a%20short%20delay%20%281%E2%80%932%20seconds%29%20for%20chart%20animations%20to%20finish%20before%20taking%20screenshots%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/discussions/36845%29.%0A%0AIf%20you%20still%20see%20empty%20charts%2C%20check%20Superset%20permissions%20and%20configuration%20to%20make%20sure%20data%20v
 
isibility%20isn%27t%20restricted%2C%20and%20review%20logs%20or%20browser%20console%20for%20subtle%20errors.%20If%20you%20can%20share%20the%20chart%20type%2C%20data%20source%2C%20and%20a%20sample%20query%20result%2C%20I%20can%20help%20dig%20deeper.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36853)

GitHub link: 
https://github.com/apache/superset/discussions/36853#discussioncomment-15363692

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to