GitHub user gatos-cc created a discussion: Display change label and color of bar chart based on value
Apologies if this is answered elsewhere - I've been searching and not really come up with much. I'm trying to graph a simple bar chart of `location` x `max(status)` over time. So the table looks something like ``` location | status | week_start | status_str A | 1 | 2025-01-05T00:00:00 | open B | 2 | 2025-01-05T00:00:00 | closed A | 2 | 2025-01-12T00:00:00 | closed B | 3 | 2025-01-12T00:00:00 | unknown ``` Set up a bar chart: * X-axis - location * Metrics - MAX(status) * Filters - (week_start = previous week) This kinda works: <img width="2062" height="671" alt="Screenshot 2025-11-05 at 10 59 26 PM" src="https://github.com/user-attachments/assets/08333e38-a233-4b0a-85fb-8f07cae55eb9" /> But the Y axis displays the raw status integer, and the tool tip displays the actual formula (`MAX(status) 3`) which is really gibberish to the end user the graph will be surfaced to. I'd really like to: a - get the Y axis to display the status_str instead of the status. I'd be OK doing this with a CASE custom SQL or something like that, but Superset is complaining it has to be numerical values. b - I'd like to scrap the tooltip altogether, or display only the status_str value, not the formula. c - I'd REALLY love to change the bar color based on the status value (e.g. 1 = Green, 2 = Red, 3 = Yellow) Is there any way to manage this? Seems like I can't be the only one looking for these kinds of customizations, but I'm having a hard time coming up with it. GitHub link: https://github.com/apache/superset/discussions/36016 ---- 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]
