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(legacy-chart): corrupted raw chart data #24850

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Jul 31, 2023

SUMMARY

In legacy charts, there's some logics mutating chartData which also corrupts the original raw data.
This makes the invalid chart results specially in the stacked chart which sums up the series values for the chart data.
This commit makes the copy of the rawData value to avoid the corruption.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
Screenshot 2023-07-31 at 2 08 22 PM

after--polluted-rawData.mov

Before:
Screenshot 2023-07-31 at 2 08 46 PM

before--polluted-rawData.mov

TESTING INSTRUCTIONS

  • Create a area chart
  • set stacked
  • choose a Y A-axis format like .3s

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

codecov bot commented Jul 31, 2023

Codecov Report

Merging #24850 (2aadb08) into master (e2d5046) will increase coverage by 0.00%.
Report is 6 commits behind head on master.
The diff coverage is 95.69%.

❗ Current head 2aadb08 differs from pull request most recent head 4d20cb6. Consider uploading reports for the commit 4d20cb6 to get more accurate results

@@           Coverage Diff           @@
##           master   #24850   +/-   ##
=======================================
  Coverage   68.99%   69.00%           
=======================================
  Files        1903     1904    +1     
  Lines       74072    74106   +34     
  Branches     8193     8193           
=======================================
+ Hits        51107    51137   +30     
- Misses      20844    20848    +4     
  Partials     2121     2121           
Flag Coverage Δ
javascript 55.83% <0.00%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
...ins/legacy-preset-chart-nvd3/src/transformProps.js 7.14% <0.00%> (-0.27%) ⬇️
superset/advanced_data_type/api.py 100.00% <ø> (ø)
superset/annotation_layers/annotations/api.py 89.23% <ø> (ø)
superset/annotation_layers/annotations/schemas.py 100.00% <ø> (ø)
superset/annotation_layers/api.py 86.20% <ø> (ø)
superset/annotation_layers/schemas.py 100.00% <ø> (ø)
superset/async_events/api.py 100.00% <ø> (ø)
superset/available_domains/api.py 100.00% <ø> (ø)
superset/cachekeys/api.py 96.15% <ø> (ø)
superset/charts/api.py 87.82% <ø> (ø)
... and 57 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@john-bodley john-bodley merged commit 1c5971d into apache:master Aug 1, 2023
@john-bodley john-bodley added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Aug 1, 2023
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Aug 3, 2023
michael-s-molina pushed a commit that referenced this pull request Aug 4, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 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 size/XS v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants