Skip to content

charton API


charton API / @chart-on/core / index / fillNumerals

Function: fillNumerals() ​

fillNumerals(ctx, text, x, y, numerals): void

Defined in: packages/core/src/typography.ts:206

ctx.fillText with digits spaced as numerals says, honouring textAlign. Right-to-left text is drawn in one piece: laying it out run by run would put the runs in the wrong order.

Parameters ​

ctx ​

CanvasRenderingContext2D

text ​

string

x ​

number

y ​

number

numerals ​

NumeralStyle

Returns ​

void