Skip to content

grafit-charts


Interface: FontsOptions

Canvas text never triggers a font download by itself: ctx.font silently falls back to a system face while the

Font-face

is still being fetched, so a chart that switches to a not-yet-loaded family draws — and measures — with the wrong one. Every family the options mention is therefore requested explicitly, and the chart lays out again once the real faces arrive: text metrics decide the geometry of axes, legend and labels.

Properties

autoReload?

optional autoReload?: boolean

Redraw the chart once a web font it uses has finished loading (on by default). Turning it off keeps the very first frame as the only one — the chart then draws with whatever face the browser has at that moment and never asks for the missing ones, since canvas text loads no fonts on its own.