You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/04/28 18:43:44 UTC

[GitHub] [superset] michael-s-molina opened a new pull request, #23870: feat: Migrates Area chart

michael-s-molina opened a new pull request, #23870:
URL: https://github.com/apache/superset/pull/23870

   ### SUMMARY
   This PR migrates the Area chart to the ECharts version.
   
   - Removes the legacy Area chart code and unregisters the plugin.
   - Removes old plugin references throughout the codebase
   - Updates unit tests
   - Updates E2E tests
   - Updates the example dashboards
   - Updates translation files
   
   Note a previous migration existed however the legacy chart wasn't removed and thus new legacy Treemap charts could have been created.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202156805


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",

Review Comment:
   I find that weird too. After we migrate the legacy charts and find ourselves in a more consolidated state, we should have another round to polish the form data to rename/remove some keys.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202182615


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0

Review Comment:
   No. It should be a number to match the type definition.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #23870:
URL: https://github.com/apache/superset/pull/23870#issuecomment-1625721769

   > Hi @michael-s-molina! When do we plan to merge it?
   
   4.0 given that the window for breaking changes is now closed.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] john-bodley commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1201269114


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",

Review Comment:
   I'm surprised this has the term `time` in it given that I thought part of the broader EChart migration was to support time agnostic, i.e., generic, charts.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("contribution"):
+            self.data["contributionMode"] = "row" if contribution else None

Review Comment:
   Given, per line #48, `contribution` is truthy this should reduce to:
   
   ```python
   if self.data.get("contribution"):
       self.data["contributionMode"] = "row"
   ```



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):

Review Comment:
   See https://github.com/apache/superset/pull/23973/files#r1201279048.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30
+
+        self.data["opacity"] = 0.7
+
+        if rolling_type := self.data.get("rolling_type"):
+            self.data["rolling_type"] = None if rolling_type == "None" else rolling_type

Review Comment:
   See https://github.com/apache/superset/pull/23973/files#r1201214384.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",

Review Comment:
   Why is there a mix of snake- and camel-case keys?



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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:
   ```suggestion
           self.data["zoomable"] = not self.data.get("show_brush") == "no"
   ```



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30

Review Comment:
   It's interesting we're switching from an auto margin to an explicit.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0

Review Comment:
   Is `0` akin to `None` or undefined? If so there's probably no need to set it.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202166284


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",

Review Comment:
   Because the controls were defined using non-standard nomenclature 😢 



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #23870: feat: Migrates Area chart

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23870:
URL: https://github.com/apache/superset/pull/23870#issuecomment-1529983889

   ## [Codecov](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#23870](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c90471c) into [master](https://codecov.io/gh/apache/superset/commit/0bf8907f2f6d7a17a1e3efa1c03a5af06daa8190?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0bf8907) will **increase** coverage by `3.17%`.
   > The diff coverage is `75.00%`.
   
   > :exclamation: Current head c90471c differs from pull request most recent head 39f0a6a. Consider uploading reports for the commit 39f0a6a to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #23870      +/-   ##
   ==========================================
   + Coverage   53.58%   56.75%   +3.17%     
   ==========================================
     Files        1938     1938              
     Lines       74957    74974      +17     
     Branches     8140     8140              
   ==========================================
   + Hits        40167    42554    +2387     
   + Misses      32706    30342    -2364     
   + Partials     2084     2078       -6     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `53.00% <44.44%> (?)` | |
   | python | `59.19% <75.55%> (+6.37%)` | :arrow_up: |
   | unit | `52.80% <73.33%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...-ui-chart-controls/src/utils/getColorFormatters.ts](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3V0aWxzL2dldENvbG9yRm9ybWF0dGVycy50cw==) | `100.00% <ø> (ø)` | |
   | [...s/legacy-plugin-chart-calendar/src/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LWNhbGVuZGFyL3NyYy9jb250cm9sUGFuZWwudHM=) | `50.00% <ø> (ø)` | |
   | [...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNWaXMuanM=) | `0.00% <ø> (ø)` | |
   | [...end/plugins/legacy-preset-chart-nvd3/src/preset.js](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL3ByZXNldC5qcw==) | `0.00% <ø> (ø)` | |
   | [...harts/src/BigNumber/BigNumberTotal/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvQmlnTnVtYmVyL0JpZ051bWJlclRvdGFsL2NvbnRyb2xQYW5lbC50cw==) | `100.00% <ø> (ø)` | |
   | [...rts/src/BigNumber/BigNumberTotal/transformProps.ts](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvQmlnTnVtYmVyL0JpZ051bWJlclRvdGFsL3RyYW5zZm9ybVByb3BzLnRz) | `0.00% <ø> (ø)` | |
   | [...lugin-chart-echarts/src/BigNumber/BigNumberViz.tsx](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvQmlnTnVtYmVyL0JpZ051bWJlclZpei50c3g=) | `0.00% <ø> (ø)` | |
   | [...gin-chart-echarts/src/Timeseries/transformProps.ts](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy90cmFuc2Zvcm1Qcm9wcy50cw==) | `57.27% <ø> (+0.51%)` | :arrow_up: |
   | [...tend/src/components/Chart/DrillBy/DrillByChart.tsx](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvRHJpbGxCeS9EcmlsbEJ5Q2hhcnQudHN4) | `100.00% <ø> (ø)` | |
   | [.../components/Chart/DrillBy/useDisplayModeToggle.tsx](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvRHJpbGxCeS91c2VEaXNwbGF5TW9kZVRvZ2dsZS50c3g=) | `100.00% <ø> (ø)` | |
   | ... and [21 more](https://codecov.io/gh/apache/superset/pull/23870?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ... and [87 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23870/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat: Migrates Area chart [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed pull request #23870: feat: Migrates Area chart
URL: https://github.com/apache/superset/pull/23870


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] john-bodley commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1201284966


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30

Review Comment:
   See https://github.com/apache/superset/pull/23973/files#r1201287181.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202180723


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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:
   This code will be inherited from the base TimeseriesChart that was created in the Line migration. I will rebase this PR on top of that one.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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:
   This code will be inherited from the base `TimeseriesChart` that was created in the Line migration. I will rebase this PR on top of that one.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202184660


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):

Review Comment:
   This code will be inherited from the base `TimeseriesChart` that was created in the Line migration. I will rebase this PR on top of that one.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] EugeneTorap commented on pull request #23870: feat: Migrates Area chart

Posted by "EugeneTorap (via GitHub)" <gi...@apache.org>.
EugeneTorap commented on PR #23870:
URL: https://github.com/apache/superset/pull/23870#issuecomment-1625720764

   Hi @michael-s-molina! When do we plan to merge it?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202183505


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30
+
+        self.data["opacity"] = 0.7
+
+        if rolling_type := self.data.get("rolling_type"):
+            self.data["rolling_type"] = None if rolling_type == "None" else rolling_type

Review Comment:
   This code will be inherited from the base `TimeseriesChart` that was created in the Line migration. I will rebase this PR on top of that one.



##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("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
+        self.data["y_axis_showminmax"] = True
 
         if stacked := self.data.get("stacked_style"):
             stacked_map = {
                 "expand": "Expand",
                 "stack": "Stack",
+                "stream": "Stream",
             }
             self.data["show_extra_controls"] = True
             self.data["stack"] = stacked_map.get(stacked)
 
-        if x_axis_label := self.data.get("x_axis_label"):
-            self.data["x_axis_title"] = x_axis_label
-            self.data["x_axis_title_margin"] = 30
+        if x_ticks_layout := self.data.get("x_ticks_layout"):
+            self.data["x_ticks_layout"] = 45 if x_ticks_layout == "45°" else 0
+
+        x_axis_label = self.data.get("x_axis_label")
+        bottom_margin = self.data.get("bottom_margin")
+        if x_axis_label and (not bottom_margin or bottom_margin == "auto"):
+            self.data["bottom_margin"] = 30

Review Comment:
   This code will be inherited from the base `TimeseriesChart` that was created in the Line migration. I will rebase this PR on top of that one.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] michael-s-molina commented on a diff in pull request #23870: feat: Migrates Area chart

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #23870:
URL: https://github.com/apache/superset/pull/23870#discussion_r1202180228


##########
superset/migrations/shared/migrate_viz/processors.py:
##########
@@ -34,20 +34,50 @@ def _pre_action(self) -> None:
 class MigrateAreaChart(MigrateViz):
     source_viz_type = "area"
     target_viz_type = "echarts_area"
+    has_x_axis_control = True
     remove_keys = {"contribution", "stacked_style", "x_axis_label"}
+    rename_keys = {
+        "x_axis_label": "x_axis_title",
+        "x_axis_format": "x_axis_time_format",
+        "x_ticks_layout": "xAxisLabelRotation",
+        "bottom_margin": "x_axis_title_margin",
+        "y_log_scale": "logAxis",
+    }
 
     def _pre_action(self) -> None:
-        if self.data.get("contribution"):
-            self.data["contributionMode"] = "row"
+        if contribution := self.data.get("contribution"):
+            self.data["contributionMode"] = "row" if contribution else None

Review Comment:
   This code will be inherited from the base `TimeseriesChart` that was created in the Line migration. I will rebase this PR on top of that one.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat: Migrates Area chart [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #23870:
URL: https://github.com/apache/superset/pull/23870#issuecomment-1806151125

   Closing this PR in favor of https://github.com/apache/superset/pull/25952 which makes it possible to migrate the chart without introducing a breaking change.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org