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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to