-
Notifications
You must be signed in to change notification settings - Fork 14
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
Polymer 2 support #19
Comments
Unfortunately, I didn't test nvd3-elements in Polymer v2. |
Ok, I'm going to try it myself and report back. |
Thank you. That will be great.
…On Sun, May 21, 2017 at 9:29 PM nicolasr75 ***@***.***> wrote:
Ok, I'm going to try it myself and report back.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2tD___TWwlia_eDp7ML1nx54vpURZuks5r8G2DgaJpZM4NgeKe>
.
|
I tested line, pie and discrete-bar in Polymer v2 and so far it works as expected! bower adds a 'resolution' section to map the old polymer version demanded by nvd3-elements to 2.0.0. The only thing I have not yet been able to get working is make the charts fill 100% of the container. I set the flex-size and auto-resize attributes and omitted explicit height and width attributes. Both line and discrete-bar charts get rendered too big in y-direction. Assume I have an (empty) container div that fills 100% of the browser window which I simply checked by setting its background-color. As soon as I place a chart with flexSize in it, a y-scrollbar appears because the chart is too big. Do you have any advice on that? How to correctly use flexSize and viewBoxHeight/Width? |
Thanks for testing it with Polymer 2.0. I'll check and upgrade Polymer on Bower soon. |
I tried to create a demo but got stuck when trying to create a chart. The Polymer stuff works but I don't know how to correctly import nvd3-elements. Do you know what is missing? Here is the plunker. Apart from that I noticed that I didn't correctly understand the viewport thing. I found a lot of stackoverflows now about responsive d3 charts but I do not yet understand how to make an nvd3-element chart fill the container. Without specifying height/width/viewPortHeight/viewPortWidth/flexSize the chart is stretched to the full width of the container which is half the way. I guess in the end I will have to set the height in code :-( Sorry for bothering you with this but I thought in the age of responsiveness it would be a great feature to easily have the chart fill the container. Any more ideas? |
You need to set the height for NVD3 Charts. If you check samples on nvd3.org, you will see the height settings. I'll try to make charts more responsive while switching to Polymer 2.0. |
Ok, I tried it and was suprised how much time it took until I got it all sorted out :-( In case anyone else has this problem I shortly sketch my solution: In the
In the
|
Hey Guys, |
This is really great work!
I am very interested in testing your components. Unfortunately my project uses Polymer 2. Do you know whether the components work in Polymer 2 in hybrid mode?
The text was updated successfully, but these errors were encountered: