How to show Charts Legend


Topic: How to show Charts Legend

Arturo Macías pro premium priority asked 8 years ago

Hi! i'm trying to figure out how to show legend in a chart but in documentation there is no clues.. I have read solutions to use in MDB, but not in MDB Angular. Any idea? Thanks!
Hi, Try to add [legend]="true" to a canvas of your chart. Example:
<div style="display: block;">
    <canvas baseChart [datasets]="chartData" [labels]="chartLabels" [options]="chartOptions" [colors]="chartColors" [chartType]="type" [legend]="true">
    </canvas>
</div>
Regards

Juvinal Alvarado commented 7 years ago

Hi. [legend]="true" is not working. Any other suggestion please? Thanks.

Rafał Rogulski commented 7 years ago

Hi, Which version of mdb angular do you use?

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No