question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pie chart resizing oddities

See original GitHub issue

My 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:closed
  • Created 9 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
anantagrawalcommented, Dec 23, 2015

@maplesap …are you using ng-show anywhere to hide/show chart ? If yes, then replace it with ng-if. It should work.

0reactions
keymsgcommented, Nov 14, 2016

@anantagrawal thanks. your suggestion fixed my issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing your pie chart - Datawrapper Academy
You have two options to resize the chart, either through resizing using your mouse or by specifying the exact size you want: Click,...
Read more >
Should you use a pie chart? Conveying audience composition
Interpretation is tougher with more categories, especially when some or all of them are similar in size. In the example below, it's not...
Read more >
Explode or expand a pie chart - Microsoft Support
Quickly change a pie chart in your presentation, document, or spreadsheet. Explode the entire pie chart or just one piece. Change to a...
Read more >
How To Prevent Pie Chart From Resizing? - Qlik Community
The pie chart is a hard requirement, so the bar chart, while solving the resize problem, does not work better in this context....
Read more >
How can i resize the pie chart? - Microsoft Power BI Community
Solved: I need to manipulate the size of my pie chart. I can edit the font size and colors but there are times...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found