February 2019
Beginner to intermediate
284 pages
6h 20m
English
Chart.js can use any fonts that are available for your website. Besides the standard fonts supported by all browsers (serif, sans-serif, monospace), you can also use online fonts loaded by a style sheet.
In the following example, we are using a free web font (OFL license), called Yanone Kaffeesatz, obtained from Google Fonts. To install it, simply load the CSS by adding the following link to the <head> of your HTML page:
<link href="https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz" rel="stylesheet">
Now you can use the Yanone Kaffeesatz font family in CSS and HTML. Canvas can set it as the context font, using the font property. The simplest way to use it in Chart.js is to declare it as the default global font. You ...
Read now
Unlock full access