score:0

i'm not sure if i got it. if you're trying to set the legends of the graph you need to set it in the chart options, not setting chart-legend to true. you're html should be like:

<canvas id="bar" class="chart chart-bar" chart-data="datta" chart-labels="labels" chart-options="chart-options"></canvas>  

than you need to create a $scope.chart-options like:

$scope.chart-options = {
    legend: {
        display: true,
    },
};

you can have more info here: chartjs legend documentation


More Query from same tag