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(plugin-chart-echarts): use scale for truncating x-axis #26269

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

villebro
Copy link
Member

@villebro villebro commented Dec 13, 2023

SUMMARY

Following up on #26215 by playing whack-a-mole on the numerical x-axis truncation problem. Move from using dataMin/dataMax to scale: true when truncating x-axis for bar charts. This applies automatic truncation by ECharts, which is able to handle truncation more gracefully. For other than bar charts, we'll retain the dataMin/dataMax logic without the scale parameter.

AFTER

Now there is a proper margin on the x-axis to not overlap y-axis.
image

Now also mixed series chart has the same functionality:
image

BEFORE

Previously the smallest and largest bars would
image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [c] Has associated issue: fixes Bar chart spilling out past x-axis on both ends #26254
  • 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

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

You need to pass seriesType from transformProps.

@michael-s-molina michael-s-molina added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Dec 13, 2023
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (578a899) 69.18% compared to head (4aca8ed) 69.18%.
Report is 2 commits behind head on master.

Files Patch % Lines
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26269   +/-   ##
=======================================
  Coverage   69.18%   69.18%           
=======================================
  Files        1945     1945           
  Lines       75948    75961   +13     
  Branches     8460     8465    +5     
=======================================
+ Hits        52545    52556   +11     
- Misses      21218    21220    +2     
  Partials     2185     2185           
Flag Coverage Δ
javascript 56.52% <72.22%> (+<0.01%) ⬆️

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.

@villebro
Copy link
Member Author

You need to pass seriesType from transformProps.

Thanks for catching, too many iterations on how to implement this caused the final commit to miss this change..

@villebro
Copy link
Member Author

/testenv up

Copy link
Contributor

@villebro Ephemeral environment spinning up at http://52.13.180.29:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina
Copy link
Member

You also need to adjust the mixed timeseries chart 🙂

@villebro
Copy link
Member Author

You also need to adjust the mixed timeseries chart 🙂

😬

@villebro
Copy link
Member Author

/testenv up

Copy link
Contributor

@villebro Ephemeral environment spinning up at http://35.161.50.28:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

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 67468c4 into apache:master Dec 14, 2023
30 checks passed
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

michael-s-molina pushed a commit that referenced this pull request Dec 18, 2023
josedev-union pushed a commit to Ortege-xyz/studio that referenced this pull request Jan 22, 2024
@mistercrunch mistercrunch added 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 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/L v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.0.3 🍒 3.0.4 🍒 3.1.0 🍒 3.1.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bar chart spilling out past x-axis on both ends
4 participants