I am using angular-chart.js, on click of any of the portion of pie chart, how to get the selected portion data's, please find the below sample code and help to get the data of selected pie portion data on click on the pie chart. or is that any way to get the chart-index to pass on the chartClick($index) ?
refer: https://jtblin.github.io/angular-chart.js/#reactive
HTML:
<canvas id="pie" class="chart chart-pie"
chart-data="data" chart-labels="labels" chart-click="chartClick($index)">
</canvas>
Js:
angular.module("app", ["chart.js"]).controller("PieCtrl", function ($scope) {
$scope.labels = ["Download Sales", "In-Store Sales", "Mail-Order Sales"];
$scope.data = [300, 500, 100];
});