Thursday, December 25, 2014

AngularJS + SVG = Radian, (without D3.js)

Radian - Home
"Radian is an open source JavaScript library that makes it easy to embed plots in HTML documents. It is being developed as part of OpenBrain’s BayesHive project."


<svg ng-attr-height="{{graph.height}}" ng-attr-width="{{graph.width}}"> <circle ng-repeat="circle in circles" ng-attr-cx="{{circle.x}}" ng-attr-cy="{{circle.y}}" ng-attr-r= "{{circle.r}}"> </circle> </svg>

$scope.circles = [ {'x': 15, 'y': 20, 'r':30}, {'x': 35, 'y': 60, 'r':20}, {'x': 55, 'y': 10, 'r':40}, ]



No comments: