sadpandajoe commented on code in PR #42910:
URL: https://github.com/apache/superset/pull/42910#discussion_r4407171181


##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -3844,6 +3854,10 @@ def merge_bullet_form_data(
     for values_key, labels_key in dependent_controls.items():
         if values_key in new_form_data and labels_key not in new_form_data:
             new_form_data[labels_key] = ""
+    # Per-band colors are applied by position, so replacing the thresholds
+    # without colors must not re-apply the old colors to the new bands.
+    if "ranges" in new_form_data and "range_colors" not in new_form_data:

Review Comment:
   An `update_chart` that repeats the saved thresholds (say `ranges=[50,100]`) 
while changing another option now clears the saved `range_colors` too, and the 
typed config has no field to send them back. The bands revert to default 
shading even though the thresholds did not change. Should the reset only apply 
when the new `ranges` differs from the existing value?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to