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

Strange behavior using IE browser #226

Closed
kavitama opened this issue Sep 15, 2015 · 4 comments
Closed

Strange behavior using IE browser #226

kavitama opened this issue Sep 15, 2015 · 4 comments

Comments

@kavitama
Copy link

While being able to show graphs without any specific issue on Opera, Firefox, Chrome, Safari when the same code is executed on Internet Explorer Browser the graph has missing parts (CSS problem?) like in the example attached.
Any hint on where the issue could come from?
screenshot048
screenshot047
screenshot049

@EvilDrW
Copy link

EvilDrW commented Sep 23, 2015

I looked into this and it seems to be a CSS problem, yes. When I manually edit the container of the charts and change it from (for example):

<svg class="nvd3-svg" width="100%" height="450">

to:

<svg class="nvd3-svg" style="width:100%; height:450px">

then it renders correctly. I guess I would recommend using the style attribute rather than width/height attributes? note that this is the same problem as #200 experiences

@kavitama
Copy link
Author

image
Not sure if it is the same but your proposal would be to change where the height is given ?
In the <nvd3-multi-bar-chart> ???

@EvilDrW
Copy link

EvilDrW commented Sep 23, 2015

Yes, I was able to solve this by changing at angular-nvd3.js#L170 to

d3.select(element[0]).append('svg')
   .style({height: scope.options.chart.height+'px', width: scope.options.chart.width || '100%'})
   .datum(data)
   .transition().duration(scope.options.chart.transitionDuration)
   .call(scope.chart);

I'll submit a PR this evening when I'm not on a hobbled work pc.

@krispo
Copy link
Owner

krispo commented Sep 26, 2015

Thanks guys for your investigation into this. I also added some fixes into your PR. The issue will be fixed in the new release (1.0.3)

@krispo krispo closed this as completed Sep 26, 2015
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