michael-s-molina commented on code in PR #23973:
URL: https://github.com/apache/superset/pull/23973#discussion_r1202175494


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -31,6 +31,39 @@ def _pre_action(self) -> None:
             self.data["metric"] = self.data["metrics"][0]
 
 
+class TimeseriesChart(MigrateViz):
+    has_x_axis_control = True
+
+    def _pre_action(self) -> None:
+        contribution = self.data.get("contribution")
+        if contribution:
+            self.data["contributionMode"] = "row" if contribution else None
+
+        show_brush = self.data.get("show_brush")
+        self.data["zoomable"] = False if show_brush == "no" else True
+
+        self.data["markerEnabled"] = self.data.get("show_markers")
+        self.data["y_axis_showminmax"] = True
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30
+
+        rolling_type = self.data.get("rolling_type")
+        if rolling_type:
+            self.data["rolling_type"] = None if rolling_type == "None" else 
rolling_type
+
+        time_compare = self.data.get("time_compare")
+        if time_compare:

Review Comment:
   I didn't run the `pre-commit` hook yet because this PR is in a draft state. 
That's why this was not transformed and CI didn't fail.



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