From 7b31a91ba5c76e98e42d35c67690d6f84f332c89 Mon Sep 17 00:00:00 2001 From: Sophie Aubier Date: Wed, 24 Sep 2025 11:15:47 +0200 Subject: [PATCH] Fix issue 386 Use the correct length for generating the color list so that each entity gets a unique color. Previously, the number of colors was tied to the number of parameters, causing display issues. --- DataPlotly/core/plot_types/radar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataPlotly/core/plot_types/radar.py b/DataPlotly/core/plot_types/radar.py index 299257ad..9c494b0a 100644 --- a/DataPlotly/core/plot_types/radar.py +++ b/DataPlotly/core/plot_types/radar.py @@ -41,7 +41,7 @@ def create_trace(settings): x = settings.properties["y_fields_combo"].split(", ") # Sample colors from the color scale based on the length of settings.y_radar_values - colors_list = pc.sample_colorscale(settings.properties['color_scale'], np.linspace(0, 1, len(settings.y_radar_values[0]))) + colors_list = pc.sample_colorscale(settings.properties['color_scale'], np.linspace(0, 1, len(settings.y_radar_values))) # List repeating the line type for each element in settings.y_radar_values line_type_list = [settings.properties['line_dash']] * len(settings.y_radar_values)