You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/27 09:49:37 UTC

[GitHub] [superset] villebro commented on a diff in pull request #19851: feat: add Advanced Analytics into mixed time series chart

villebro commented on code in PR #19851:
URL: https://github.com/apache/superset/pull/19851#discussion_r859599972


##########
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx:
##########
@@ -253,11 +255,33 @@ function createCustomizeSection(
   ];
 }
 
+function createAdvancedAnalyticsSection(
+  label: string,
+  controlSuffix: string,
+): ControlPanelSectionConfig {
+  const aaWithSuffix = cloneDeep(sections.advancedAnalyticsControls);
+  aaWithSuffix.label = label;
+  if (!controlSuffix) {
+    return aaWithSuffix;
+  }
+  aaWithSuffix.controlSetRows.forEach(row =>
+    row.forEach((control: CustomControlItem) => {
+      if (control?.name) {
+        // eslint-disable-next-line no-param-reassign
+        control.name = `${control.name}${controlSuffix}`;
+      }
+    }),
+  );
+  return aaWithSuffix;
+}
+

Review Comment:
   One minor observation: the "Periods" sets the visibility based on the state of the "Rolling Type" control:
   <img width="537" alt="image" src="https://user-images.githubusercontent.com/33317356/165491265-6b139d39-2e20-4e85-9472-daef5ec0bab3.png">
   This causes the "Periods" section in the B section to have an incorrect visibility (should be hidden for `cumsum`):
   <img width="316" alt="image" src="https://user-images.githubusercontent.com/33317356/165490846-4eb22cb0-11cf-449c-b00a-ab81fe2d4e38.png">
   



-- 
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