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


##########
superset/mcp_service/chart/chart_utils.py:
##########
@@ -623,6 +627,60 @@ def map_pie_config(config: PieChartConfig) -> Dict[str, 
Any]:
         "date_format": "smart_date",
     }
 
+    if time_range := getattr(config, "time_range", None):
+        form_data["time_range"] = time_range
+
+    if config.filters:
+        form_data["adhoc_filters"] = [
+            {
+                "clause": "WHERE",
+                "expressionType": "SIMPLE",
+                "subject": filter_config.column,
+                "operator": map_filter_operator(filter_config.op),
+                "comparator": filter_config.value,
+            }
+            for filter_config in config.filters
+            if filter_config is not None
+        ]
+
+    return form_data

Review Comment:
   Did we mean to add this to pie config as this PR has to do with big number?



-- 
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