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

Charts can't be displayed within tabs #215

Open
carolineBda opened this issue Dec 14, 2015 · 3 comments
Open

Charts can't be displayed within tabs #215

carolineBda opened this issue Dec 14, 2015 · 3 comments

Comments

@carolineBda
Copy link

Hello,

If you try to display a chart within an tab (or anything which will gets loaded with a style display:none) then the error "Please set height and width for the chart element" is throw. Even if an height and width is set to the char class.

@umair321
Copy link

Facing same issue without tabs :(

@daniel-halldorsson
Copy link

same here, also without tabs, happens on resize

@fireworkstudio
Copy link

@carolineBda @umair321 @daniel-halldorsson
I add two scope variables in directive, and now it works. But this is not a final solution, I am still wait for official resolution.

  1. Add two scope variables in directive
    image
  2. Replace the places using element[0]'s width and height to new variables
    image
  3. In your view template, add new attributes
    image
  4. In your controller, define the values
    image

You may refer to codes of my project:
angular-charts.min.js
dashboard.html
dashboard-controller.js

Here is the screenshot, hope this method will help you solve the problem
image

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

4 participants