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

Use @vx/responsive to provide Chart width on Explore page #6104

Merged
merged 6 commits into from Oct 17, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Oct 15, 2018

  • Use ParentSize to provide chart width in ExploreChartPanel.
  • Remove complicated logic in Chart.jsx for getting element width.
  • Remove unnecessary jQuery usage.

@graceguo-supercat @williaster @conglei @michellethomas

@codecov-io
Copy link

codecov-io commented Oct 15, 2018

Codecov Report

Merging #6104 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6104   +/-   ##
=======================================
  Coverage   77.23%   77.23%           
=======================================
  Files          47       47           
  Lines        9349     9349           
=======================================
  Hits         7221     7221           
  Misses       2128     2128

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 af0ffa4...fae29eb. Read the comment docs.

@kristw kristw closed this Oct 15, 2018
@kristw kristw reopened this Oct 15, 2018
@kristw kristw closed this Oct 15, 2018
@kristw kristw reopened this Oct 15, 2018
@kristw kristw closed this Oct 15, 2018
@kristw kristw reopened this Oct 15, 2018
@kristw kristw closed this Oct 15, 2018
@kristw kristw reopened this Oct 15, 2018
@kristw kristw closed this Oct 15, 2018
@kristw kristw reopened this Oct 15, 2018
@kristw kristw force-pushed the kristw-explorechartpanel branch 2 times, most recently from d5fe71d to 8ff94c6 Compare October 16, 2018 00:11
datasource={this.props.datasource}
formData={this.props.form_data}
width={Math.floor(width)}
height={this.getHeight()}
Copy link
Contributor

Choose a reason for hiding this comment

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

should this now take the height from ParentSize into account?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just tried. It doesn't work out of the box. May need to change the css of the container (.panel-header and .panel-body) into flexbox similar to what I did with WithLegend to make sure ParentSize computes the correct height. Now the height is larger than it should be.

I prefer not to deal with it now and leave this for future PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

sgtm 👍

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

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

LGTM.

one question for testing, did you test the explore url with &standalone=true to test standalone mode?

@kristw
Copy link
Contributor Author

kristw commented Oct 17, 2018

Good call @williaster . Just verify the standalone mode and is good to go.

@williaster williaster merged commit 273991f into apache:master Oct 17, 2018
@kristw kristw deleted the kristw-explorechartpanel branch November 1, 2018 21:24
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
* use parent size to compute width

* simplify this.width() and this.height()

* remove unnecessary jquery

* fix indent and import

* adjust headerheight from 100 to 80

* fix test
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 27, 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 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants