feat: Adds Heatmap chart migration logic (#27771)

This commit is contained in:
Michael S. Molina
2024-03-29 12:08:43 -03:00
committed by GitHub
parent c0f8dfc7f9
commit 356b0d8ee5
4 changed files with 109 additions and 2 deletions

View File

@@ -213,3 +213,18 @@ class MigrateBubbleChart(MigrateViz):
# Truncate y-axis by default to preserve layout
self.data["y_axis_showminmax"] = True
class MigrateHeatmapChart(MigrateViz):
source_viz_type = "heatmap"
target_viz_type = "heatmap_v2"
rename_keys = {
"all_columns_x": "x_axis",
"all_columns_y": "groupby",
"y_axis_bounds": "value_bounds",
"show_perc": "show_percentage",
}
remove_keys = {"sort_by_metric", "canvas_image_rendering"}
def _pre_action(self) -> None:
self.data["legend_type"] = "continuous"