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
Conversation
Codecov Report
@@ 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.
|
90d10f9
to
da099f0
Compare
d5fe71d
to
8ff94c6
Compare
datasource={this.props.datasource} | ||
formData={this.props.form_data} | ||
width={Math.floor(width)} | ||
height={this.getHeight()} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm 👍
8ff94c6
to
6f809f2
Compare
There was a problem hiding this 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?
Good call @williaster . Just verify the standalone mode and is good to go. |
* 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
ParentSize
to provide chart width inExploreChartPanel
.Chart.jsx
for getting element width.jQuery
usage.@graceguo-supercat @williaster @conglei @michellethomas