angularjsangular-chart

Can a chart-line show a legend like chart-radar (for instance)?


I have the angularjs chartline:

  <canvas id="line" class="chart chart-line" chart-data="data" chart-series="series" chart-labels="labels" chart-options="options" chart-legend="true">
    </canvas>

I want it to show legend (series) on the top of chart like how it works at chart-radar. enter image description here

I have all settings for this, but it doesn't work properly:

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

enter image description here

How to do it?


Solution

  • It was necessary to add to the options namespace. Like this:

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