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: Contribution percentages for ECharts plugins #28368

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Fix percentages shown in tooltips of ECharts plugins that contain time offsets and contribution mode enabled. The ECharts version does not distinguish series and time shifts when calculating the contribution percentages as the legacy version does. Instead of showing something like series A 50%, series B 50%, series A (a year ago) 50%, series B (a year ago) 50%, it shows all series with 25%. With this fix, the contribution of time shifts are calculated independently.

This is another pre-requisite to unblock timeseries chart migrations.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2024-05-03 at 10 05 57 Screenshot 2024-05-07 at 10 25 03

TESTING INSTRUCTIONS

Check that time shift contributions are calculated independently.

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

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

Attention: Patch coverage is 13.51351% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 67.30%. Comparing base (2e5f3ed) to head (e37fcf7).
Report is 44 commits behind head on master.

Files Patch % Lines
...perset/utils/pandas_postprocessing/contribution.py 11.42% 31 Missing ⚠️
.../plugin-chart-echarts/src/Timeseries/buildQuery.ts 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #28368      +/-   ##
==========================================
+ Coverage   60.49%   67.30%   +6.80%     
==========================================
  Files        1931     1934       +3     
  Lines       76241    76787     +546     
  Branches     8566     8572       +6     
==========================================
+ Hits        46122    51679    +5557     
+ Misses      28015    23011    -5004     
+ Partials     2104     2097       -7     
Flag Coverage Δ
hive ?
javascript 57.71% <50.00%> (-0.02%) ⬇️
mysql 77.20% <11.42%> (?)
postgres 77.31% <11.42%> (?)
presto ?
python 77.50% <11.42%> (+14.01%) ⬆️
sqlite 76.76% <11.42%> (?)
unit ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 7, 2024
@michael-s-molina
Copy link
Member Author

michael-s-molina commented May 8, 2024

@dosubot dosubot bot added the lgtm label 18 hours ago

@rusackas Does the bot add this label because someone approved the PR or because it reviewed the changes and considered them good enough to merge?

@michael-s-molina michael-s-molina merged commit 55f3b46 into apache:master May 8, 2024
30 of 31 checks passed
@rusackas
Copy link
Member

rusackas commented May 9, 2024

@dosubot dosubot bot added the lgtm label 18 hours ago

@rusackas Does the bot add this label because someone approved the PR or because it reviewed the changes and considered them good enough to merge?

Because it was reviewed by a committer and is basically mergeable... we can turn it off if we'd like, I'm not sure it's helping much.

@michael-s-molina
Copy link
Member Author

Because it was reviewed by a committer and is basically mergeable... we can turn it off if we'd like, I'm not sure it's helping much.

Got it. I believe we can turn it off as it's not providing additional value.

@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label May 9, 2024
@rusackas
Copy link
Member

rusackas commented May 9, 2024

Ok, it's off now :)

imancrsrk pushed a commit to imancrsrk/superset that referenced this pull request May 10, 2024
michael-s-molina added a commit that referenced this pull request May 13, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
@mistercrunch mistercrunch added 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 24, 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 lgtm This PR has been approved by a maintainer packages plugins size/L v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants