chartjs-directive.js
.<div ng-app="myApp">
<chart value="myChart"></chart>
</div>
angular.module('myApp', ['chartjs-directive'])
.controller('myController', function($scope){
var data = {
labels : ["January","February","March","April","May","June","July"],
datasets : [
{
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
pointStrokeColor : "#fff",
data : [65,59,90,81,56,55,40]
},
{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
pointStrokeColor : "#fff",
data : [28,48,40,19,96,27,100]
}
]
}
$scope.myChart = data;
});
^ This is a chart
value
(default: "Line")width
(default: 600)height
(default: 400)value can be any of the chartjs chart types:
data
options
Installable via bower
:
bower install angular-chartjs-directive
MIT