GitHub user dosubot[bot] added a comment to the discussion: Display change 
label and color of bar chart based on value

<!-- Answer -->
Superset bar charts require numeric values for the Y-axis, so you can't 
directly display string labels (like status_str) on the Y-axis—only numeric 
formatting is supported for axis and bar labels 
[(source)](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/transformProps.ts).
 Tooltips are generated by a formatter function that displays numeric values, 
and there isn't a built-in UI option to remove tooltips or show only a string 
label; customizing this would require code changes 
[(source)](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/transformProps.ts).

Bar colors are assigned per series name using a color function, not dynamically 
per bar value. Conditional coloring based on metric values (like status) isn't 
natively supported in the UI—you'd need to preprocess your data to create 
separate series for each status or modify the frontend code 
[(source)](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-echarts/src/Histogram/transformProps.ts).

Recent updates added more color and label customization for Waterfall charts, 
but these settings aren't general-purpose for all bar charts or for mapping 
arbitrary metric values to custom colors or labels 
[(source)](https://github.com/apache/superset/pull/34847).

If you need to show status_str, consider using a Table chart, or preprocess 
your data to group by status_str and use it as a series or groupby dimension. 
For advanced customizations (like mapping Y-axis values to strings, custom 
tooltips, or conditional bar colors), code changes in the frontend would be 
required.


<!-- 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/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b47ed492-fea7-4bf8-a926-ddadb8b78fa4?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36016)

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

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