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(chart): chart gets cut off on the dashboard #20315

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

stephenLYZ
Copy link
Member

SUMMARY

This PR fixes the problem that chart will get cut off on the dashboard.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

image

after

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Lgtm

@michael-s-molina
Copy link
Member

@stephenLYZ maybe we can make it a little more readable?

getHeaderHeight() {
  if (this.headerRef) {
    const computedStyle = getComputedStyle(this.headerRef).getPropertyValue(
      'margin-bottom',
    );
    const marginBottom = parseInt(computedStyle, 10) || 0;
    return this.headerRef.offsetHeight + marginBottom;
  }
  return DEFAULT_HEADER_HEIGHT;
}

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jun 8, 2022
@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #20315 (be7b680) into master (354a899) will decrease coverage by 0.00%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master   #20315      +/-   ##
==========================================
- Coverage   66.64%   66.64%   -0.01%     
==========================================
  Files        1738     1738              
  Lines       65053    65056       +3     
  Branches     6884     6885       +1     
==========================================
  Hits        43356    43356              
- Misses      19950    19953       +3     
  Partials     1747     1747              
Flag Coverage Δ
javascript 51.61% <20.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../src/dashboard/components/gridComponents/Chart.jsx 58.82% <20.00%> (-1.79%) ⬇️

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 354a899...be7b680. Read the comment docs.

@michael-s-molina
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

@michael-s-molina Ephemeral environment spinning up at http://34.222.89.77: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

@rusackas
Copy link
Member

rusackas commented Jun 8, 2022

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

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

@stephenLYZ stephenLYZ merged commit 07b4a71 into apache:master Jun 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

Ephemeral environment shutdown and build artifacts deleted.

@sadpandajoe
Copy link
Member

🏷️ preset:2022.23

sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Jun 9, 2022
* fix(chart): chart gets cut off on the dashboard

* add some failsafe

* address comment

(cherry picked from commit 07b4a71)
michael-s-molina pushed a commit that referenced this pull request Aug 30, 2022
* fix(chart): chart gets cut off on the dashboard

* add some failsafe

* address comment

(cherry picked from commit 07b4a71)
@mistercrunch mistercrunch added 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 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 preset:2022.23 size/S 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants