dosubot[bot] commented on issue #40783: URL: https://github.com/apache/superset/issues/40783#issuecomment-4627329638
<!-- Answer --> Great bug report — the root cause analysis is spot-on. I can confirm the relevant code in [Legend.tsx](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-preset-chart-deckgl/src/components/Legend.tsx#L104-L115): ```tsx const style = { color: `rgba(${v.color?.join(', ')})` }; const icon = v.enabled ? '\u25FC' : '\u25FB'; ... <span style={style}>{icon}</span> {formatCategoryLabel(k)} ``` The fix is straightforward. A few options in order of robustness: 1. **Add `text-presentation` variation selector** — append `\uFE0E` (VS15) after the glyph to force text presentation: ```tsx const icon = v.enabled ? '\u25FC\uFE0E' : '\u25FB\uFE0E'; ``` This tells the browser to use the monochrome text glyph rather than the color-emoji glyph, so CSS `color` applies normally. 2. **Replace the Unicode glyph with a small inline `<span>` styled as a colored box** (more resilient to cross-platform font differences): ```tsx <span style={{ display: 'inline-block', width: '0.75em', height: '0.75em', backgroundColor: `rgba(${v.color?.join(', ')})`, marginRight: theme.gridUnit, }} /> ``` 3. **Set `font-family` on the swatch `<span>`** to a known monochrome/text font (e.g. `sans-serif`) and add `font-variant-emoji: text` — though browser support for `font-variant-emoji` is still limited. Option 1 is the smallest change; option 2 is the most bulletproof since it removes font/glyph dependencies entirely. No existing PRs or issues addressing this specific emoji-presentation rendering problem were found in the repo, so this is indeed a fresh report of a long-standing latent bug. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=2067d037-c348-4e6f-a98e-5c670b44810c) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
