Change chart font family


Topic: Change chart font family

raha_001101 asked 6 years ago

Hi how to change font family of chart's label and numbers?


Damian Gemza staff answered 6 years ago

Dear @raha_001101

Our Charts are port of Chart.js library. Here's the documentation for their Charts font options.

Please take a look at the below code:

public chartOptions: any = {
    responsive: true,
    legend: {
      labels: {
        fontColor: 'red',
        defaultFontFamily: 'Arial'
      }
    }
  };

Best Regards,

Damian


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.1
  • Device: PC
  • Browser: FireFox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No
Tags