Interface: CanvasFontSpec

Hierarchy

Properties

family

family: string

Default font family for all text, follows CSS font-family options.

Default

“‘Helvetica Neue’, ‘Helvetica’, ‘Arial’, sans-serif”

Inherited from

FontSpec.family

Defined in

types/index.d.ts:1735CanvasFontSpec - 图1 (opens new window)


lineHeight

lineHeight: string | number

Height of an individual line of text (see MDN).

Default

1.2

Inherited from

FontSpec.lineHeight

Defined in

types/index.d.ts:1754CanvasFontSpec - 图2 (opens new window)


size

size: number

Default font size (in px) for text. Does not apply to radialLinear scale point labels.

Default

12

Inherited from

FontSpec.size

Defined in

types/index.d.ts:1740CanvasFontSpec - 图3 (opens new window)


string

string: string

Defined in

types/index.d.ts:1758CanvasFontSpec - 图4 (opens new window)


style

style: "normal" | "inherit" | "italic" | "oblique" | "initial"

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)

Default

‘normal’

Inherited from

FontSpec.style

Defined in

types/index.d.ts:1745CanvasFontSpec - 图5 (opens new window)


weight

weight: string

Default font weight (boldness). (see MDN).

Inherited from

FontSpec.weight

Defined in

types/index.d.ts:1749CanvasFontSpec - 图6 (opens new window)