chinmaymk/angular-charts

Error: Please set height and width for the chart element

Closed this issue · 20 comments

it is throwing Error: Please set height and width for the chart element..
But when i set width and height in css/html then the page is crashing...

2.7 is causing the browser to freeze and crash. I installed 2.6 and the issue was resolved.

I also have the issue, using bootstrap and ng-hide/show

in 2.6 i also have a Error: Please set height and width for the chart element..
in 2.7 with waitForHeightAndWidth:true - browser to freeze.
using bootstrap modal for view charts

srph commented

Reverting to 0.2.6 fixes the issue for me.

@cementovoz - Are you sure you have [exactly] 0.2.6 in your bower.json? I wasted hours thinking reverting to 0.2.5 was the solution, then I realized that ~0.2.6 updates the version to 0.2.7.

Reverting to 0.2.6 fixed the issue for me too.

Bumping, 0.2.7 is the problem.

Have the same problem with 0.2.7 version.

Same here, worked after switching 0.2.7to 0.2.6. Thanks for heads up!

I still get the issue when reverting to 0.2.6 and 0.2.5. I'm using angular~1.3.11

srph commented

Are you sure that you are reverting to 0.2.6? May you provide us your bower.json?

{
  ...
  "resolutions": {
    "jquery": "~2.0.3"
  },
  "dependencies": {
    "angular": "~1.3.11",
    "angular-ui": "~0.4.0",
    "jquery": "~2.1.3",
    "angular-ui-router": "~0.2.13",
    "bootstrap": "~3.3.2",
    "angular-charts": "0.2.6"
  }
}
srph commented

That's weird. Have you tried running bower update or re-installing the bower dependencies?

Same issue. Just installed angular-charts via bower for the first time, and struggled for an hour before I found this. Reverting to 0.2.6 did it.

Thank you guys... its working fine now..

Same here. Thx guys and thx google for pointing me here with the search "angular charts page freeze".
For some reason I also had to set a width in pixel and not in %...

Thanks guys!

Thanks so much. I wasted 3 hours before finding this thread. Reverting back to 0.2.6 did the trick!

0.2.6 does work for me, too.

the reason for all of this seems to be jquery (or wrong way of iteration in the code) and a fix is already available:
moumar@487205e

I've patched version 0.2.7 for testing and it works. Hopefully there will be a bower update later on.

ditto re: 0.2.6 - google lead me here....

tks