Render a legend on angular-chart.js doughnut chart

前端 未结 2 1021
忘了有多久
忘了有多久 2021-01-08 00:10

I\'ve followed angular-chart.js documentation, and created a chart, but am unable to render a legend with it. I don\'t understand why its not working.

Documentation:

2条回答
  •  囚心锁ツ
    2021-01-08 00:34

    If you're using the 1.0.0-alpha branch based on chart.js 2, the correct syntax is:

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

    and in your html

    
     
    

提交回复
热议问题