Skip to content

charton API


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

Function: labelPill() ​

labelPill(ctx, env, text, x, y, options?): number

Defined in: packages/core/src/drawing/draw.ts:235

Rounded label with its text vertically centered on y. Returns the pill width.

Parameters ​

ctx ​

CanvasRenderingContext2D

env ​

DrawingEnv

text ​

string

x ​

number

y ​

number

options? ​

LabelPillOptions = {}

Returns ​

number