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

Graph area crops on redraw() and increased size. #309

Closed
sck-v opened this issue Oct 26, 2013 · 5 comments
Closed

Graph area crops on redraw() and increased size. #309

sck-v opened this issue Oct 26, 2013 · 5 comments

Comments

@sck-v
Copy link

sck-v commented Oct 26, 2013

Trying to resize graph area with a fluid layout. The jquery code is(pseudo):

element = $('#chart')
bar = Morris.Bar(....)
$(window).on('resize', function() { bar.redraw() });

It works fine when reducing window size. But when the page is loaded in small size and then size is increasing, then chart area becomes cropped.

The inner svg size stills initial and redraw() don't touch it.
The workaround is add css rule:

#chart > svg { width: 100% !important; }

But i think that the inner svg size should be recalculated.

@tijs
Copy link

tijs commented Oct 31, 2013

@sck-v thanks, mate! should be part of the standard libarray as you say as far as i'm concerned but this fix works for me for now at least

@guilbep
Copy link

guilbep commented Oct 31, 2013

@sck-v Wow. Thanks. No css bug anymore on redraw 👍

@t3chn0r
Copy link

t3chn0r commented Oct 31, 2013

Was having the same issue, thanks for the workaround, at least it's working now until a more definitive solution is implemented. 👍

@oesmith
Copy link
Contributor

oesmith commented Nov 9, 2013

There's a solution in master now. See #111.

@sudodoki
Copy link
Contributor

Assume duplicate of #111

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

6 participants