* base font
* @see Defaults.font
*/
- font: Scriptable<Partial<FontSpec>, ScriptableContext<TType>>;
+ font: Partial<FontSpec>;
/**
* Resizes the chart canvas when its container does (important note...).
* @default true
Chart.defaults.datasets.bar.backgroundColor = 'red';
Chart.defaults.animation = { duration: 500 };
+
+Chart.defaults.font.size = 8;
+
+// @ts-expect-error should be number
+Chart.defaults.font.size = '8';
+
+// @ts-expect-error should be number
+Chart.defaults.font.size = () => '10';
+
+Chart.defaults.font = {
+ family: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
+ size: 10
+};