Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(big-number): Big Number with Trendline Chart is not working if Time Grain is set to Month #19043

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

stephenLYZ
Copy link
Member

@stephenLYZ stephenLYZ commented Mar 7, 2022

SUMMARY

This PR fixes the issue that Big Number with Trendline Chart is not working if Time Grain is set to Month and Rolling Function is set to cumsum.
refer https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

2022-03-07.4.13.38.mov

after

2022-03-07.4.12.34.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this @stephenLYZ ! I believe we should do the same for the other grains, too, like P3M which should probably be QS. Thoughts?

@stephenLYZ
Copy link
Member Author

stephenLYZ commented Mar 7, 2022

@villebro Good catch! Looks like P1M/P3M/P1Y all need to use start frequency here.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing!

@stephenLYZ
Copy link
Member Author

Btw. It's a good way to move the entire AA control to here in order to maintain uniformity and reduce additional issues. @zhaoyongjie cc

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #19043 (98125cd) into master (bd63a1b) will decrease coverage by 0.08%.
The diff coverage is 60.55%.

❗ Current head 98125cd differs from pull request most recent head 96676cd. Consider uploading reports for the commit 96676cd to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #19043      +/-   ##
==========================================
- Coverage   66.58%   66.49%   -0.09%     
==========================================
  Files        1641     1641              
  Lines       63533    63476      -57     
  Branches     6424     6444      +20     
==========================================
- Hits        42303    42211      -92     
- Misses      19551    19601      +50     
+ Partials     1679     1664      -15     
Flag Coverage Δ
javascript 51.28% <57.32%> (-0.10%) ⬇️
postgres ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...perset-ui-chart-controls/src/sections/sections.tsx 100.00% <ø> (ø)
...chart-controls/src/shared-controls/dndControls.tsx 35.89% <ø> (ø)
...et-ui-chart-controls/src/shared-controls/index.tsx 36.36% <ø> (+0.36%) ⬆️
...perset-ui-core/src/chart/components/SuperChart.tsx 100.00% <ø> (ø)
...ckages/superset-ui-core/src/query/extractExtras.ts 100.00% <ø> (ø)
.../superset-ui-core/src/query/types/QueryFormData.ts 100.00% <ø> (ø)
...src/BigNumber/BigNumberWithTrendline/buildQuery.ts 9.09% <ø> (ø)
...frontend/src/SqlLab/components/ResultSet/index.tsx 50.73% <ø> (ø)
...d/src/SqlLab/components/SaveDatasetModal/index.tsx 71.42% <ø> (ø)
...frontend/src/SqlLab/components/SaveQuery/index.tsx 57.89% <ø> (ø)
... and 160 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd63a1b...96676cd. Read the comment docs.

@villebro villebro merged commit c32eaf4 into apache:master Mar 7, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.9

@zhaoyongjie
Copy link
Member

Btw. It's a good way to move the entire AA control to here in order to maintain uniformity and reduce additional issues. @zhaoyongjie cc

Thanks for the fix.

villebro pushed a commit that referenced this pull request Apr 3, 2022
…me Grain is set to Month (#19043)

* fix(big-number): Big Number with Trendline Chart is not working if Time Grain is set to Month

* use start frequency.

(cherry picked from commit c32eaf4)
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lts-v1 preset:2022.9 size/XS 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants