Still have questions?
Contact support



All AnyChart products support full localization of input and output date/time and number formats, based on the locale mechanism. This article describes how to use locales (which is quite easy).

All the methods you need are located on anychart.format namespace.

You can also see how locales work using our localization demo applications:

Applying an Automatic Locale

AnyChart provides built-in locales covering most regions and cultures. To use an automatic locale, first link a file from AnyChart CDN or download it to your server and link it from there.

Linking from CDN looks like this:

<script src="">
<script src="">

Linking from your server may look like this:

<script src="./locales/english-(united-kingdom).js">
<script src="">

After the file is linked, AnyChart engine knows about it, and you can start applying the locale in your charts: just set the code of the locale using the inputLocale() or outputLocale() methods. Codes of locales are listed in the CODE column on AnyChart CDN.

Setting input and output locales looks like this:


Tuning a Locale

If you want to use custom input and output date/time formats, you can tune them via the inputDateTimeFormat() and outputDateTimeFormat() methods:

// set locales

// tune inputDateTimeFormat and outputDateTimeFormat
anychart.format.outputDateTimeFormat('dd MMM');

You can also tune any output in tooltips or labels formatters using dateTime() and {api:}number(){api} methods:

chart.xAxis().labels().textFormatter(function () {
return anychart.format.dateTime(this.value, 'MMM', -8 * 60, locale);
chart.tooltip().titleFormatter(function () {
return anychart.format.dateTime(this.points[0].x, format, -8 * 60, locale);

Locales in AnyChart CDN

You can get all available locales from AnyChart CDN and either download them to your server or link directly from the CDN.