michael-s-molina commented on code in PR #23973:
URL: https://github.com/apache/superset/pull/23973#discussion_r1202200139
##########
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
Review Comment:
I think the previous version is more readable. I read like if equals to "no"
then is `false`, everything else ("yes, "auto", null) is `true`.
##########
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
Review Comment:
I think the previous version is more readable. I read it like if equals to
"no" then is `false`, everything else ("yes, "auto", null) is `true`.
--
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]