GitHub user dosubot[bot] added a comment to the discussion: Custom Color 
Selector for each line or bar

<!-- Greeting -->
Hi @pparth2302! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.

<!-- Answer -->
Yes, you can assign specific colors to your OEE status values! The best 
approach is using **dashboard-level label colors**.

When you add your Gantt chart to a dashboard, edit the dashboard and go to 
**JSON Metadata** in the dashboard settings. Add a `label_colors` configuration 
like this:

```json
{
    "label_colors": {
        "Running": "#00AA00",
        "Down": "#FF0000",
        "Changeover": "#FFAA00"
    }
}
```

This [takes precedence over the default color 
scheme](https://github.com/apache/superset/discussions/31855#discussioncomment-11839699)
 and will consistently apply Green for Running, Red for Down, and Yellow for 
Changeover across your charts.

Alternatively, you can [define a custom color palette in 
`superset/config.py`](https://github.com/apache/superset/discussions/37040) 
using `EXTRA_CATEGORICAL_COLOR_SCHEMES` if you want a reusable palette, but the 
dashboard metadata approach is simpler for your specific use case.

One caveat: [per-value color mapping through the chart UI itself is 
limited](https://github.com/apache/superset/issues/33836#issuecomment-2989492653),
 so the dashboard-level approach is currently the most practical solution 
without custom code.


<!-- 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/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=hallucination)
 | [Report 
šŸ›](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/4b192d8a-f583-4564-a68c-c0ca7b74071a?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Yes%2C%20you%20can%20assign%20specific%20colors%20to%20your%20OEE%20status%20values%21%20The%20best%20approach%20is%20using%20%2A%2Adashboard-level%20label%20colors%2A%2A.%0A%0AWhen%20you%20add%20your%20Gantt%20chart%20to%20a%20dashboard%2C%20edit%20the%20dashboard%20and%20go%20to%20%2A%2AJSON%20Metadata%2A%2A%20in%20the%20dashboard%20settings.%20Add%20a%20%60label_colors%60%20configuration%20like%20this%3A%0A%0A%60%60%60json%0A%7B%0A%20%20%20%20%22label_colors%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22Running%22%3A%20%22%2300AA00%22%2C%0A%20%20%20%20%20%20%20%20%22Down%22%3A%20%22%23FF0000%22%2C%0A%20%20%20%20%20%20%20%20%22Changeover%22%3A%20%22%23FFAA00%22%0A%20%20%20%20%7D%0A%7D%0A%60%60%60%0A%0AThis%20%5Btakes%20precedence%20over%20the%20default%2
 
0color%20scheme%5D%28https%3A//github.com/apache/superset/discussions/31855%23discussioncomment-11839699%29%20and%20will%20consistently%20apply%20Green%20for%20Running%2C%20Red%20for%20Down%2C%20and%20Yellow%20for%20Changeover%20across%20your%20charts.%0A%0AAlternatively%2C%20you%20can%20%5Bdefine%20a%20custom%20color%20palette%20in%20%60superset/config.py%60%5D%28https%3A//github.com/apache/superset/discussions/37040%29%20using%20%60EXTRA_CATEGORICAL_COLOR_SCHEMES%60%20if%20you%20want%20a%20reusable%20palette%2C%20but%20the%20dashboard%20metadata%20approach%20is%20simpler%20for%20your%20specific%20use%20case.%0A%0AOne%20caveat%3A%20%5Bper-value%20color%20mapping%20through%20the%20chart%20UI%20itself%20is%20limited%5D%28https%3A//github.com/apache/superset/issues/33836%23issuecomment-2989492653%29%2C%20so%20the%20dashboard-level%20approach%20is%20currently%20the%20most%20practical%20solution%20without%20custom%20code.)&nbsp;[![Join
 Discord](https://img.shields.io/badge/join-5865F2?l
 
ogo=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/38363)

GitHub link: 
https://github.com/apache/superset/discussions/38363#discussioncomment-15987660

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