Skip to content
ChartDeck ChartScript docs Account Open the terminal

size

Text sizes. The Labels & text size switch of the settings dialog (Tiny 0.75x, Small 0.875x, Normal, Large 1.25x, Extra-large 1.5x) scales every text size of the script.

#Functions

#size.ptfunction

A text size in typographic points.

size.pt(pt: const float): size
ParameterTypeDescription
ptconst floatPoints.

Returns size.

Example

ChartScriptFragmentOpen in editor
const sz = input.size(size.pt(9), "Label size")

Since ChartScript 1

#size.pxfunction

A text size in pixels (6-48).

size.px(px: const float): size
ParameterTypeDescription
pxconst floatPixels.

Returns size.

Example

ChartScriptFragmentOpen in editor
const sz = input.size(size.px(12), "Label size")

Since ChartScript 1

#size.relfunction

A text size relative to the default (1 = default, 1.2 = 20 % larger).

size.rel(scale: const float): size
ParameterTypeDescription
scaleconst floatThe factor (0.5-4).

Returns size.

Example

ChartScriptFragmentOpen in editor
const sz = input.size(size.rel(1.2), "Label size")

Since ChartScript 1

#Constants

NameTypeDescription
size.autosizeSize: auto.
size.hugesizeSize: huge.
size.largesizeSize: large.
size.normalsizeSize: normal.
size.smallsizeSize: small.
size.tinysizeSize: tiny.

The ChartScript documentation is in English for now; translations will follow.