gonewandering / angles

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

the graph is not drawn, if values don't change #37

Open MikeBild opened 10 years ago

MikeBild commented 10 years ago

e.g. $scope.chartData.datasets[0].data=[5,5,5,5,5];

ericclemmons commented 10 years ago

This breaks with an error:

Error: [$parse:ueoe] Unexpected end of expression: {
          labels: [
http://errors.angularjs.org/1.3.0-beta.17/$parse/ueoe?p0=%7B%0A%20%20%20%20%20%20%20%20%20%20labels%3A%20%5B
    at http://localhost:3000/bower_components/angular/angular.js:78:12
    at Parser.peekToken (http://localhost:3000/bower_components/angular/angular.js:10746:13)
    at Parser.arrayDeclaration (http://localhost:3000/bower_components/angular/angular.js:11037:14)
    at Parser.primary (http://localhost:3000/bower_components/angular/angular.js:10705:22)
    at Parser.unary (http://localhost:3000/bower_components/angular/angular.js:10958:19)
    at Parser.multiplicative (http://localhost:3000/bower_components/angular/angular.js:10941:21)
    at Parser.additive (http://localhost:3000/bower_components/angular/angular.js:10932:21)
    at Parser.relational (http://localhost:3000/bower_components/angular/angular.js:10923:21)
    at Parser.equality (http://localhost:3000/bower_components/angular/angular.js:10914:21)
    at Parser.logicalAND (http://localhost:3000/bower_components/angular/angular.js:10905:21) <ui-view class="ng-scope"> 
<canvas linechart width="640" height="240" data="{
  labels: ["January", "February", "March", "April", "May", "June", "July"],
  datasets: [
    {
      label: "My First dataset",
      fillColor: "rgba(220,220,220,0.2)",
      strokeColor: "rgba(220,220,220,1)",
      pointColor: "rgba(220,220,220,1)",
      pointStrokeColor: "#fff",
      pointHighlightFill: "#fff",
      pointHighlightStroke: "rgba(220,220,220,1)",
      data: [65, 59, 80, 81, 56, 55, 40]
    },
    {
      label: "My Second dataset",
      fillColor: "rgba(151,187,205,0.2)",
      strokeColor: "rgba(151,187,205,1)",
      pointColor: "rgba(151,187,205,1)",
      pointStrokeColor: "#fff",
      pointHighlightFill: "#fff",
      pointHighlightStroke: "rgba(151,187,205,1)",
      data: [28, 48, 40, 19, 86, 27, 90]
    }
  ]
}"></canvas>