dosubot[bot] commented on issue #35929: URL: https://github.com/apache/superset/issues/35929#issuecomment-3473108197
<!-- Answer --> This error happens because Superset's deck.gl Scatterplot expects the color category to be a string or another hashable type, but when you use a CASE statement, the result is sometimes handled as a dict/object in the frontend JS layer. This breaks the color mapping logic, leading to the "unhashable type: 'dict'" error. A recent fix was merged to improve categorical color handling in deck.gl Scatterplot ([PR #35537](https://github.com/apache/superset/pull/35537)), which ensures color values are properly mapped and converted to arrays of RGBA values. If you're running the latest master/dev, this fix should be included. If you still see the error, double-check that your CASE statement returns simple string values and that the color scheme type in the chart controls is set to "categorical" (not "fixed color")—this can help restore expected color mapping and legend behavior ([related issue](https://github.com/apache/superset/issues/35499)). If the problem persists, it may be due to how the CASE expression is serialized and passed through the pipeline. As a workaround, try creating a calculated column in your dataset or database with the CASE logic, then use that column for coloring instead of entering the CASE statement directly in the chart controls. This ensures the value is always a string and avoids the dict/object issue in the JS layer. <!-- 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/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/87606eea-0eab-4535-b540-2b47c341fba9?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/35929) -- 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]
