pie chart resizing oddities
See original GitHub issueMy pie chart is acting really oddly. I have it wrapped in some bootstrap element tabs and I noticed:
(1) On page load, click on chart tab and chart is tiny and not resized to parent container (2) On browser window dimension change, the chart gets resized correctly (3) On mouseover to a section of the pie chart, the chart section shrinks back to its tiny dimensions in (1)
Here is an image to visually show what is happening: https://imgur.com/2znRdol
The images correspond to the actions (1) - (3) that I described.
my bower dependencies:
"d3": "~3.5.5",
"nvd3": "~1.7.1",
"angular-nvd3": "~0.1.1"
_UPDATE_ I found a similar bug report: https://github.com/krispo/angular-nvd3/issues/85
I’ve created a plnkr based on it: http://plnkr.co/edit/G1Q8QiFpLnsA9116o2wq?p=preview
My problem (1) is fixed, but (2) and (3) are still problems. In plunkr, click the second tab. If you hover the mouse over the pie sections, they’ll shrink. Then, change the browser dimensions and you’ll see the pie becomes the correct size again, only to shrink once you mouse over (again!).
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@maplesap …are you using ng-show anywhere to hide/show chart ? If yes, then replace it with ng-if. It should work.
@anantagrawal thanks. your suggestion fixed my issue.