charton API / @chart-on/core / index / LocalizationOptions
Interface: LocalizationOptions
Defined in: packages/core/src/util/locale.ts:17
The localization chart option: the language of numbers, dates and the built-in text. Every field is optional; without any of them the chart keeps its built-in English output.
Properties
dateFormat?
optionaldateFormat?:DateTimeFormatOptions
Defined in: packages/core/src/util/locale.ts:44
Intl.DateTimeFormat fields for the date in the crosshair label and other full dates, e.g. { day: 'numeric', month: 'long', year: 'numeric' }. Unset: day, abbreviated month and whole year, in the locale's order, or ISO 8601 (2026-10-16) with no locale and a 24-hour clock. Time-of-day fields here are ignored; the time follows hourCycle.
decimalSeparator?
optionaldecimalSeparator?:string
Defined in: packages/core/src/util/locale.ts:26
Decimal mark for every number the chart shows, whatever the locale says, e.g. ','.
grouping?
optionalgrouping?:boolean
Defined in: packages/core/src/util/locale.ts:34
Group the digits of prices the locale's way, e.g. 1.234,50 in German or 12,34,567.50 in Indian English, on the price axis, the crosshair, the legend and the data window. Typed prices accept the grouping back. Price formats with a unit and custom formats are left as they are. Default false: prices are not grouped (1234,50).
hourCycle?
optionalhourCycle?:"h12"|"h23"
Defined in: packages/core/src/util/locale.ts:36
12 or 24 hour clock. Unset: the locale's own, or 24 hours without a locale.
locale?
optionallocale?:string
Defined in: packages/core/src/util/locale.ts:24
BCP 47 language tag, e.g. 'de-DE' or 'ja-JP'. Decimal marks, minus and percent signs, digits (e.g. Arabic-Indic for 'ar-EG', or any -u-nu- numbering system), month and weekday names and the time format follow it through Intl. Unset (the default): the built-in English formats.
messages?
optionalmessages?:Readonly<Record<string,string>>
Defined in: packages/core/src/util/locale.ts:46
Your text by message key (see defaultMessages); keys left out keep the default. A new object replaces the previous one.
translate?
optionaltranslate?: (key,params) =>string|undefined
Defined in: packages/core/src/util/locale.ts:51
Called for every message before the defaults, e.g. to hand keys to an i18n library. Return undefined to use messages or the English default.
Parameters
key
string
params
Returns
string | undefined