Bug description
In the sample dashboards that come with Superset when using the default docker compose
development setup, tooltips on World Map charts appear as a solid white box with no content.
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.11
Node version
18 or greater
Browser
Chrome
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Hi @ongdisheng! I'm Dosu and I’m helping the superset team.
This issue is likely caused by either missing/blank data for the tooltip fields or by the lack of CSS styling for the tooltip container. The World Map chart uses the Datamaps library, which injects tooltip content into a div with the class .hoverinfo. If the relevant data fields (m1, m2) or the formatter output are empty, the tooltip will render as a white box with no content. There is also no custom CSS for .hoverinfo, so on a white background, empty tooltips appear as solid white boxes see code details.
To troubleshoot:
- Inspect the chart data and ensure the m1/m2 fields are present and non-empty for each country.
- Check the browser console for errors when hovering over the map.
- Use browser dev tools to inspect the .hoverinfo div when a tooltip appears—see if it contains any text or if it's just an empty div.
- If the tooltip is present but invisible, try adding custom CSS to style .hoverinfo, for example:
.hoverinfo {
color: #222;
background: #fff;
border: 1px solid #888;
padding: 8px 12px;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
There was a recent issue with tooltips losing formatting due to new XSS filtering; the suggested workaround is to use CSS classes for tooltip styling instead of inline styles see discussion.
If these steps don't resolve it, please check if the tooltip content is being generated at all (e.g., by logging the formatter output), and share any browser console errors or sample data for further debugging.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: rusackas
I would guess this is on master
with theming in place, so I'll label it as a theming bug.