apache/superset

Negative values are being shown on the wrong side of radar chart axes

gilles-dataroots opened this issue ยท 5 comments

Bug description

Since my company updated to the latest version of Superset begin December, I'm seeing weird visuals on radar plots. As you can see the negative values are now being plotted on the opposite side of the axis.

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Hey @gilles-dataroots! I'm here to help you with any bugs, questions, or contributions you have for Superset. Let's get this sorted out together!

The issue you're experiencing with negative values being plotted on the wrong side of radar chart axes might be related to recent changes in the radar chart component. The latest updates introduced new configuration options for metrics, specifically radarMetricMaxValue and radarMetricMinValue, which allow users to specify maximum and minimum values for metrics. The radarMetricMinValue defaults to '0' if not set, which might affect how negative values are displayed [1][2].

To address this issue, you might want to check the configuration of your radar chart to ensure that the radarMetricMinValue is set appropriately for your data, especially if it includes negative values. Adjusting these settings could help correct the visual representation of negative values on the radar chart axes.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

The previous version of the radar chart would dynamically make sure all values were being plotted on the axis. Is this no longer the intended goal? A hardcoded radarMetricMinValue would not allow for an index without a hard minimum...

The radar chart component in the latest version of Superset still supports dynamic adjustment of axis values based on the data range. The radarMetricMinValue and radarMetricMaxValue are optional configurations. If these values are not set, the radar chart will automatically use the minimum and maximum values from the data, allowing for dynamic scaling without a hardcoded minimum or maximum [1][2]. If you're experiencing issues with negative values, ensure that these configurations are not inadvertently set to values that could affect the dynamic scaling.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosu that sounds promising, where can I actually find and update the radarMetricMinValue parameter?

I've found the option in the Customize tab of the edit chart page. Even after removing the 0 and setting the radarMetricMinValue for the metric Night to auto, the chart still displays some negative values on the wrong size of the origin as you can see below.
image
image