Angularjs 在圆环角图表中添加文本
我在angularJS中使用angular-chart.js制作了一个油炸圈饼图 HTML文件:Angularjs 在圆环角图表中添加文本,angularjs,chart.js,angular-chart,angular-chartist.js,Angularjs,Chart.js,Angular Chart,Angular Chartist.js,我在angularJS中使用angular-chart.js制作了一个油炸圈饼图 HTML文件: <div ng-app="App"> <div ng-controller="Controller"> <canvas id="pie33" options="options" class="chart chart-doughnut chart-xs ng-isolate-scope rotate" height="120" width="240" data="
<div ng-app="App">
<div ng-controller="Controller">
<canvas id="pie33" options="options" class="chart chart-doughnut chart-xs ng-isolate-scope rotate" height="120" width="240" data="pieDiskData.data" labels="pieDiskData.labels" colours="pieDiskData.colours" legend="true" ></canvas>
</div>
这是小提琴:
我需要在图形的中心添加一个文本,并删除图例和工具提示。请帮忙
此外,我还遇到了一个同样的angularJS指令。我想使用此指令创建图形。如果您能为同样的目标而工作,我们将不胜感激
谢谢
angular.module('App', ["chart.js"]);
angular.module('App').controller('Controller', ['$scope', '$http', '$location', '$window',
function ($scope, $http, $location, $window) {
$scope.options = {
tooltipEvents: [],
showTooltips: false,
tooltipCaretSize: 0,
scaleShowLabels: false,
onAnimationComplete: function () {
this.showTooltip(this.segments, true);
},
};
var diskDataJson = {
"data": [100, 100, 100, 100],
"labels": ["red", "gree","blue","white"],
"colours": ['#FF0000', '#008000','#0000FF', '#FFFFFF']
};
$scope.pieDiskData = diskDataJson;
}]);