angular.min.js:108 TypeError: shapes.nodes is not a function
at Array.legend (http://localhost:3000/lib/d3/d3-legend.js:4101:36)
at Array.d3_selectionPrototype.call (http://localhost:3000/lib/d3/d3.js:975:14)
at post (http://localhost:3000/js/directives.js:2505:22)
at ea (http://localhost:3000/lib/angular/angular.min.js:74:16)
at w (http://localhost:3000/lib/angular/angular.min.js:61:340)
at g (http://localhost:3000/lib/angular/angular.min.js:54:250)
at g (http://localhost:3000/lib/angular/angular.min.js:54:267)
at g (http://localhost:3000/lib/angular/angular.min.js:54:267)
at g (http://localhost:3000/lib/angular/angular.min.js:54:267)
at g (http://localhost:3000/lib/angular/angular.min.js:54:267) <div my-legend-info="">
var linear = d3.scale.linear()
.domain([0,10])
.range(["rgb(46, 73, 123)", "rgb(71, 187, 94)"]);
d3.select(iElement[0]).remove("svg");
var svg = d3.select(iElement[0]).append("svg");
svg.append("g")
.attr("class", "legendLinear")
.attr("transform", "translate(20,20)");
var legendLinear = d3.legendColor()
.shapeWidth(30)
.orient('horizontal')
.scale(linear);
svg.select(".legendLinear")
.call(legendLinear);