angular binding for dygraphs
This is the project page for angular binding of wunderful dygraphs
$ git clone git@github.com:robotnic/angular-dygraphs.git
bower
$ bower install angular-dygraphs
<div ng-app="Examples" ng-controller="ChartController">
<dygraphs data="graph.data" opts="graph.opts" ></dygraphs>
</div>
var myApp = angular.module('Examples', ["dygraphs-directive"]);
myApp.controller('ChartController', function($scope) {
$scope.graph = {
data: [
[new Date(2014, 0, 1), 10, 100],
[new Date(2014, 1, 1), 20, 80],
[new Date(2014, 2, 1), 50, 60],
[new Date(2014, 3, 1), 70, 80]
],
opts: {
labels: ["x", "A", "B"]
}
};
});