javascript - Angular nvd3 donut chart - how to add a static or dynamic title? - -
i using angular nvd3-pie-chart. idea or suggestion how add static or dynamic title @ center of donut chart?
here code block.
<nvd3-pie-chart data="exampledata" id="exampleid" showlabels="true" x="xfunction()" y="yfunction()" donut="true" donutratio=".5" donutlabelsoutside="true"> </nvd3-pie-chart> function examplectrl($scope){ $scope.exampledata = [ { key: "one", y: 5 }, { key: "two", y: 2 } ]; $scope.xfunction = function(){ return function(d) { return d.key; }; } $scope.yfunction = function(){ return function(d) { return d.y; }; } }
Comments
Post a Comment