-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Bubble chart migration logic #26033
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm, this occurs prior to the renaming of the keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason the bottom margin is now fix to 30 (pixels?) as opposed to being automatic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout adjustments to match the legacy version's look.
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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