john-bodley commented on code in PR #23973:
URL: https://github.com/apache/superset/pull/23973#discussion_r1201279048
##########
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"):
Review Comment:
```suggestion
if self.data.get("x_axis_label") and (self.data.get("bottom_margin")
or "auto") == "auto":
```
--
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]