Skip to content

Commit

Permalink
Update font spec type (#11605)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee authored Dec 4, 2023
1 parent 5161e41 commit 8e19199
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/general/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e19199

Please sign in to comment.