Topic: How to show Charts Legend

Arturo Macías priority asked 6 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!

Rafał Rogulski free answered 6 years ago


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 free commented 6 years ago

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

Rafał Rogulski free commented 6 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

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No