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

Changes to window height make the chart height to grow #2

Open
antonpodolsky opened this issue Sep 4, 2014 · 2 comments
Open

Changes to window height make the chart height to grow #2

antonpodolsky opened this issue Sep 4, 2014 · 2 comments

Comments

@antonpodolsky
Copy link

Each time the height of the browser window is changed the H.Legend.prototype.render function is called, which results in growth of the chart height.

@TorsteinHonsi
Copy link
Contributor

Demo please?

In this fiddle, it seems to behave well when resizing the frame.

@mcNux
Copy link

mcNux commented Nov 18, 2014

Here's an example. It happens when the chart doesn't have a height specified, either specified in options or inherited from container's height (so all I did with your jsfiddle was remove the height from the container).

Specifying the height is obviously required but setting it on the container causes the chart to overlap any content after (notice the content after, which you can't see - only tested in Chrome) as the container's height isn't adjusted by the plugin (which we can't do either because subsequent renders use the new height!).

So my current workaround is to just set the height via the chart.height setting. Not ideal but works.

Thanks for the plugin.

theKeithD added a commit to theKeithD/adapt-chart-to-legend that referenced this issue Jun 7, 2017
("added a condition which prevents adding height more than once")
TorsteinHonsi pushed a commit that referenced this issue Oct 29, 2018
("added a condition which prevents adding height more than once")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants