Angular-dygraphs

angular binding for dygraphs

View the Project on GitHub robotnic/angular-dygraphs

Welcome to angular-dygraphs.

This is the project page for angular binding of wunderful dygraphs

Licence

legal

Installation

git
 
$ git clone git@github.com:robotnic/angular-dygraphs.git
bower
 
$ bower install angular-dygraphs

At the moment the project is just a copy of a stackoverflow answer.

http://stackoverflow.com/questions/21468244/dygraphs-not-working-with-ng-repeat

zoom the chart

On Desktop you can highlight a part of the chart to zoom in. On Touchdevices multitouch zoom is available.

In your HTML


            <div ng-app="Examples" ng-controller="ChartController">
                <dygraphs data="graph.data" opts="graph.opts" ></dygraphs>
            </div>


Angular


    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"]
            }

        };
    });


view in plunker

Two Way binding

http://plnkr.co/edit/yRDcn36yEy98kf0dii1h?p=preview