michael-s-molina commented on code in PR #26033:
URL: https://github.com/apache/superset/pull/26033#discussion_r1400589020
##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -184,3 +184,32 @@ def _pre_action(self) -> None:
)
self.data["opacity"] = 0.7
+
+
+class MigrateBubbleChart(MigrateViz):
+ source_viz_type = "bubble"
+ target_viz_type = "bubble_v2"
+ rename_keys = {
+ "bottom_margin": "x_axis_title_margin",
+ "left_margin": "y_axis_title_margin",
+ "limit": "row_limit",
+ "x_axis_format": "xAxisFormat",
+ "x_log_scale": "logXAxis",
+ "x_ticks_layout": "xAxisLabelRotation",
+ "y_axis_showminmax": "truncateYAxis",
+ "y_log_scale": "logYAxis",
+ }
+ remove_keys = {"x_axis_showminmax"}
+
+ def _pre_action(self) -> None:
+ bottom_margin = self.data.get("bottom_margin")
+ if self.data.get("x_axis_label") and (
+ not bottom_margin or bottom_margin == "auto"
+ ):
+ self.data["bottom_margin"] = 30
Review Comment:
Layout adjustments to match the legacy version look.
--
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]