You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "JustineAssoulant (via GitHub)" <gi...@apache.org> on 2025/11/17 08:44:39 UTC
[D] radar chart min and max values [superset]
GitHub user JustineAssoulant created a discussion: radar chart min and max values
Hello, I created a radar chart with Superset v5. For one of my variables, I would like higher numbers to be considered worse. In other words, the closer the value is to 0, the farther the point should be from the center, and the larger it is, the closer it should be to the center. To achieve this, I turned the variable into a negative value, but now I end up with a '-' sign in front of it… And I set 0 as the max value and -10 as the min
GitHub link: https://github.com/apache/superset/discussions/36131
----
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] radar chart min and max values [superset]
Posted by "JustineAssoulant (via GitHub)" <gi...@apache.org>.
GitHub user JustineAssoulant added a comment to the discussion: radar chart min and max values
Can I add a new number formatting that i create ?
GitHub link: https://github.com/apache/superset/discussions/36131#discussioncomment-14987238
----
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] radar chart min and max values [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: radar chart min and max values
<!-- Answer -->
You can use D3 format strings in the Superset UI to customize how numbers are displayed in charts, including radar charts. For example, you can show negatives in parentheses or adjust decimal places. However, if you want to add a completely custom number format (like hiding the minus sign or applying special logic), you need to extend Superset's frontend code by creating a new number formatter and registering it in the formatter registry. This involves writing a custom format function in JavaScript/TypeScript and updating files like `setupFormatters.ts` in the codebase. There isn't a built-in UI option for end users to add arbitrary new formats beyond D3 syntax—custom logic requires developer changes and a redeploy. More details and examples of adding custom formatters are shown in recent pull requests ([example](https://github.com/apache/superset/pull/30593), [example](https://github.com/apache/superset/pull/30559)).
<!-- 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/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/25c2e6ce-2879-475a-b07b-5d603b5b1a3a?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36131)
GitHub link: https://github.com/apache/superset/discussions/36131#discussioncomment-14987251
----
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] radar chart min and max values [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: radar chart min and max values
<!-- Answer -->
Superset doesn't have a built-in option to invert radar chart axes so that higher values are closer to the center. Setting negative values (like min = -10, max = 0) will show a minus sign unless you use a custom number format. You can set per-metric min and max values in the radar chart's "Customize Metrics" section using `radarMetricMinValue` and `radarMetricMaxValue`—but the axis direction itself can't be flipped natively, only scaled as-is.
The closest workaround is to transform your data (multiply by -1), but this will display negative signs unless you use a D3 number format string that hides or alters them (for example, using parentheses for negatives). Superset's number formatting is D3-based, so you can experiment with format strings in the "Number format" control, but there's no built-in way to simply drop the minus sign entirely. More details on how this works are in the code for the radar chart plugin and its control panel ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts#L53-L314), [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx#L44-L214)).
If you need to visually invert the axis without negative signs, you may need to preprocess your data to fit the desired scale and use a custom number format to minimize the impact of negative values.
<!-- 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/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/dcc3cc44-504b-4db7-bbca-325bfbd00050?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36131)
GitHub link: https://github.com/apache/superset/discussions/36131#discussioncomment-14987169
----
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] radar chart min and max values [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: radar chart min and max values
<!-- Answer -->
You can use D3 format strings in the Superset UI to customize how numbers are displayed in charts, including radar charts. For example, you can show negatives in parentheses or adjust decimal places. However, if you want to add a completely custom number format (like hiding the minus sign or applying special logic), you need to extend Superset's frontend code by creating a new number formatter and registering it in the formatter registry. This involves writing a custom format function in JavaScript/TypeScript and updating files like `setupFormatters.ts` in the codebase. There isn't a built-in UI option for end users to add arbitrary new formats beyond D3 syntax—custom logic requires developer changes and a redeploy. More details and examples of adding custom formatters are shown in recent pull requests ([example](https://github.com/apache/superset/pull/30593), [example](https://github.com/apache/superset/pull/30559)).
<!-- 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=25c2e6ce-2879-475a-b07b-5d603b5b1a3a) [](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/36131#discussioncomment-14987251
----
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] radar chart min and max values [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: radar chart min and max values
<!-- Answer -->
Superset doesn't have a built-in option to invert radar chart axes so that higher values are closer to the center. Setting negative values (like min = -10, max = 0) will show a minus sign unless you use a custom number format. You can set per-metric min and max values in the radar chart's "Customize Metrics" section using `radarMetricMinValue` and `radarMetricMaxValue`—but the axis direction itself can't be flipped natively, only scaled as-is.
The closest workaround is to transform your data (multiply by -1), but this will display negative signs unless you use a D3 number format string that hides or alters them (for example, using parentheses for negatives). Superset's number formatting is D3-based, so you can experiment with format strings in the "Number format" control, but there's no built-in way to simply drop the minus sign entirely. More details on how this works are in the code for the radar chart plugin and its control panel ([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts#L53-L314), [source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/Radar/controlPanel.tsx#L44-L214)).
If you need to visually invert the axis without negative signs, you may need to preprocess your data to fit the desired scale and use a custom number format to minimize the impact of negative values.
<!-- 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=dcc3cc44-504b-4db7-bbca-325bfbd00050) [](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/36131#discussioncomment-14987169
----
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