GitHub user RyanAccuWebCloud edited a comment on the discussion: Display change 
label and color of bar chart based on value

You can’t directly replace the Y-axis numeric value with strings in a bar chart 
in Apache Superset, but you can handle this with a simple workaround:

Create a new column via SQL or a virtual dataset:

CASE 
  WHEN status = 1 THEN 'Open'
  WHEN status = 2 THEN 'Closed'
  WHEN status = 3 THEN 'Unknown'
END AS status_label


Use status_label as a dimension (group by) instead of status as a metric, so 
the chart shows readable text.

To control bar colors based on status, go to Customize → Color Scheme and 
define a mapping (for example: “Open”=green, “Closed”=red, “Unknown”=yellow). 


If you want to simplify or hide the tooltip, you can disable tooltips in the 
chart’s “Customize” tab or use a custom JSON override template.

If you’re running Superset on a cloud VPS, platforms like AccuWeb Cloud make 
managing datasets and chart performance smooth, feel free to check out.

GitHub link: 
https://github.com/apache/superset/discussions/36016#discussioncomment-14892222

----
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