diff --git a/docs/general/fonts.md b/docs/general/fonts.md index 9b2d6c842ce..df9f4f6cb67 100644 --- a/docs/general/fonts.md +++ b/docs/general/fonts.md @@ -29,7 +29,7 @@ let chart = new Chart(ctx, { | `family` | `string` | `"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif"` | Default font family for all text, follows CSS font-family options. | `size` | `number` | `12` | Default font size (in px) for text. Does not apply to radialLinear scale point labels. | `style` | `string` | `'normal'` | Default font style. Does not apply to tooltip title or footer. Does not apply to chart title. Follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit). -| `weight` | `string` | `undefined` | Default font weight (boldness). (see [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)). +| `weight` | `normal` \| `bold` \| `lighter` \| `bolder` \| `number` | `undefined` | Default font weight (boldness). (see [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)). | `lineHeight` | `number`\|`string` | `1.2` | Height of an individual line of text (see [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height)). ## Missing Fonts diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 12a6ed6c1fa..6e661188a0b 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1777,7 +1777,7 @@ export interface FontSpec { /** * Default font weight (boldness). (see MDN). */ - weight: string | null; + weight: 'normal' | 'bold' | 'lighter' | 'bolder' | number | null; /** * Height of an individual line of text (see MDN). * @default 1.2