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/06 05:56:26 UTC

[GitHub] [superset] zhaoyongjie commented on a diff in pull request #19542: fix: big number with trendline can't calculate cumsum

zhaoyongjie commented on code in PR #19542:
URL: https://github.com/apache/superset/pull/19542#discussion_r843493861


##########
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/buildQuery.ts:
##########
@@ -18,63 +18,33 @@
  */
 import {
   buildQueryContext,
-  PostProcessingResample,
+  DTTM_ALIAS,
   QueryFormData,
 } from '@superset-ui/core';
 import {
   flattenOperator,
+  pivotOperator,
+  resampleOperator,
   rollingWindowOperator,
-  sortOperator,
 } from '@superset-ui/chart-controls';
 
-const TIME_GRAIN_MAP: Record<string, string> = {
-  PT1S: 'S',
-  PT1M: 'min',
-  PT5M: '5min',
-  PT10M: '10min',
-  PT15M: '15min',
-  PT30M: '30min',
-  PT1H: 'H',
-  P1D: 'D',
-  P1M: 'MS',
-  P3M: 'QS',
-  P1Y: 'AS',
-  // TODO: these need to be mapped carefully, as the first day of week
-  //  can vary from engine to engine
-  // P1W: 'W',
-  // '1969-12-28T00:00:00Z/P1W': 'W',
-  // '1969-12-29T00:00:00Z/P1W': 'W',
-  // 'P1W/1970-01-03T00:00:00Z': 'W',
-  // 'P1W/1970-01-04T00:00:00Z': 'W',
-};
-

Review Comment:
   Use explicit the Resample control to select.



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