-
Notifications
You must be signed in to change notification settings - Fork 83
Getting chart in controller. I'm trying to use chart='var', but 'var remains 'null' even after chart is drawn. #19
Comments
Check this example (this is to implement some custom onclicks, but does show how to expose the chart object to your controller) http://jsfiddle.net/Lfmhcab3/4/ |
+1 to vic64 |
partial
|
returns
|
Im not sure why that would be happening, i know that the Could you double check that Chart.js is 1.0.0+ ? If it is, would you be able to fork this example http://jsfiddle.net/Lfmhcab3/4/ and try to create this problem so I can take a look? |
I found the problem was bower installs the wrong chart js. I replaced with the current stable version from github and it worked just fine.
|
@carlcraig: I discovered that there is a problem with the scope visibility. If you wish to expose the chart object successfully at all cases I suggest you fire an event that anyone outside tc-angular-chartj can catch.
To solve this issue for current version, create a dedicated controller for the chart and put it on the wrapper html element as described in the example above. Something like this:
Then declare |
No description provided.
The text was updated successfully, but these errors were encountered: