You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "umamaheswararao37 (via GitHub)" <gi...@apache.org> on 2026/04/28 09:13:50 UTC
[D] How to change the color in Guage chart, i want add my custom color [superset]
GitHub user umamaheswararao37 created a discussion: How to change the color in Guage chart, i want add my custom color
<img width="612" height="470" alt="image" src="https://github.com/user-attachments/assets/92edff44-d33f-4cb8-81c3-d7f1dd2323b3" />
GitHub link: https://github.com/apache/superset/discussions/39718
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "umamaheswararao37 (via GitHub)" <gi...@apache.org>.
GitHub user umamaheswararao37 added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
color scheme is disabled as it following dashboard color scheme
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741130
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
<!-- Answer -->
You can customize Gauge chart colors using the **Interval Colors** and **Interval Bounds** settings in the chart's configuration panel:
1. **Interval bounds** — Define the value ranges as comma-separated values (e.g., `33,66,100`). This splits the gauge into segments: 0–33, 33–66, 66–100 [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx#L264-L278).
2. **Interval colors** — Provide comma-separated integers (e.g., `1,2,3`) that reference colors from your selected **Color Scheme** (1-indexed). The number of colors must match the number of interval bounds [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx#L280-L292).
3. **Color Scheme** — Choose a color scheme from the dropdown in "Chart Options" to control which palette the interval color indices map to [[3]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx#L110).
For example, to make a red/yellow/green gauge with a max of 100:
- Set **Interval bounds**: `33,66,100`
- Set **Interval colors**: `1,2,3`
- Pick a color scheme whose first three colors are the ones you want.
If the built-in schemes don't have the exact colors you need, you can define a custom color palette via `EXTRA_CATEGORICAL_COLOR_SCHEMES` in your `superset_config.py`, then select that scheme in the chart.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset#message_id=f56c055e-1a22-4673-b48d-0b937fe51802) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741009
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "umamaheswararao37 (via GitHub)" <gi...@apache.org>.
GitHub user umamaheswararao37 edited a comment on the discussion: How to change the color in Guage chart, i want add my custom color
@dosu. color scheme is disabled as it following dashboard color scheme
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741130
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
<!-- Answer -->
The Gauge chart's interval color settings only accept **integer indices** referencing colors from the selected color scheme — you can't paste a hex value like `#00450D` directly into the chart configuration [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/controlPanel.tsx#L281-L291) [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts#L73-L75).
**Workaround:** Define a custom color scheme that includes `#00450D`, then reference it in the chart:
1. In your `superset_config.py`, add a custom scheme:
```python
EXTRA_CATEGORICAL_COLOR_SCHEMES = [
{
"id": "my_custom_scheme",
"description": "Custom green scheme",
"label": "My Custom Green",
"isDefault": False,
"colors": ["#00450D", "#FFFFFF", "#CCCCCC"] # add more colors as needed
}
]
```
2. Restart Superset.
3. In the Gauge chart, select **My Custom Green** as the color scheme.
4. Set **Interval bounds** (e.g., `100`) and **Interval colors** to `1` (which references the first color, `#00450D`).
This will apply your exact `#00450D` color to the gauge's progress bar.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset#message_id=df0b485f-248d-4896-815c-8c5029577711) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741090
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "umamaheswararao37 (via GitHub)" <gi...@apache.org>.
GitHub user umamaheswararao37 added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
how can add a particular color to the progress bar , as i want to show #00450D
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741071
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
<!-- Answer -->
That's a known limitation — when a chart is on a dashboard, the dashboard's color scheme overrides the chart-level setting and disables the selector [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx#L317) [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/controlUtils/getFormDataWithDashboardContext.ts#L224).
To apply your specific `#00450D` color, you can use **`label_colors` in the dashboard's JSON metadata**:
1. Enter **dashboard edit mode**.
2. Click the **three-dot menu** → **Edit properties**.
3. Under **Advanced**, find the **JSON Metadata** field.
4. Add a `label_colors` entry mapping your gauge's label to the desired color:
```json
{
"label_colors": {
"Your Label Name": "#00450D"
}
}
```
5. Save the dashboard.
This takes precedence over the dashboard color scheme [[3]](https://github.com/apache/superset/discussions/38363) and will apply your exact hex color.
Alternatively, you can change the **dashboard-level color scheme** itself to a custom one that includes `#00450D` — go to **Edit properties → Colors** section and select your custom scheme there [[4]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx#L467-L476). That custom scheme would need to be defined in `superset_config.py` via `EXTRA_CATEGORICAL_COLOR_SCHEMES` as mentioned earlier.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset#message_id=7db3100c-3d6d-407b-a00a-381ca04da141) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741201
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] How to change the color in Guage chart, i want add my custom color [superset]
Posted by "umamaheswararao37 (via GitHub)" <gi...@apache.org>.
GitHub user umamaheswararao37 added a comment to the discussion: How to change the color in Guage chart, i want add my custom color
"label_colors": {
"Total Waste Obligation (MT)": "#00450D"
} i have added the metric but not getting reflected
GitHub link: https://github.com/apache/superset/discussions/39718#discussioncomment-16741302
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org