feat: Add Bubble chart migration logic#26033
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #26033 +/- ##
==========================================
+ Coverage 69.05% 69.08% +0.03%
==========================================
Files 1938 1941 +3
Lines 75837 75896 +59
Branches 8427 8444 +17
==========================================
+ Hits 52367 52434 +67
+ Misses 21300 21286 -14
- Partials 2170 2176 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| source_viz_type = "bubble" | ||
| target_viz_type = "bubble_v2" | ||
| rename_keys = { | ||
| "bottom_margin": "x_axis_title_margin", |
There was a problem hiding this comment.
Unrelated, but what's the reason we have a mix of snake- and camel-case in the chart properties?
There was a problem hiding this comment.
It's always the same answer... 😏
| self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0 | ||
|
|
||
| # Truncate Y-axis by default to preserve layout | ||
| self.data["y_axis_showminmax"] = True |
There was a problem hiding this comment.
Just to confirm, this occurs prior to the renaming of the keys?
| if self.data.get("x_axis_label") and ( | ||
| not bottom_margin or bottom_margin == "auto" | ||
| ): | ||
| self.data["bottom_margin"] = 30 |
There was a problem hiding this comment.
Any reason the bottom margin is now fix to 30 (pixels?) as opposed to being automatic?
There was a problem hiding this comment.
Layout adjustments to match the legacy version's look.
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
SUMMARY
This PR adds the Bubble chart migration logic (NVD3 ➡️ ECharts). Users can execute this migration using the #25304 CLI command and disable the legacy version with the VIZ_TYPE_DENYLIST configuration.
@sadpandajoe @jinghua-qa
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
1 - Upgrade a Bubble chart using the CLI command
2 - Check the new chart
3 - Downgrade a Bubble chart using the CLI command
4 - Check the legacy chart
ADDITIONAL INFORMATION