gonewandering / angles

An angular.js wrapper for Chart.js
MIT License
632 stars 87 forks source link

Added $scope $watcher for the chart's options. #74

Closed Roundaround closed 8 years ago

Roundaround commented 8 years ago

Added $scope $watcher for the chart's options that reflects the updating behavior of the data. This is especially useful when loading the information asynchronously or using a single canvas element for multiple charts. I simply pulled the initialization code out of the data $watcher and put it in a standalone function that gets called by both the data and options $watchers.

jmelosegui commented 8 years ago

PR addressing multiple issues are rarely merged (IMO). So keep it simple to increase the chances of your PR to be merge.

Roundaround commented 8 years ago

Sorry for the extra fixes in there. I forgot I had made this PR. We've been using my fork via bower in a project at work and we've just been using it as our 'up-to-date' version.