Thanks to ZingChart user barryvdh's suggestion, we have decided to create a repository to share chart localizations within the ZingChart community.

Chart Localization Repo


Locales in ZingChart are useful when developers want to change how text is displayed in the context menu, scale items, and other aspects in the chart. Within your JSON, but outside the graphset object, include “locale”:”MYLOCALE” in which MYLOCALE is the name used in your locale JavaScript object, which we will use to set the labels.

Localized Chart Example

zingchart.i18n.en_us =  {
	'rtl' : false,
	'decimals-separator' : '.',
	'thousands-separator' : '',
	'menu-reload' : 'Reload',
	'menu-print' : 'Print Chart',
	'menu-viewaspng' : 'View As PNG',
	'menu-viewasjpg' : 'View As JPG',
	id: 'myChart',
	data: {
  	locale: 'en_us'
  		type: 'line',
  		series: [{
  			values: [1,2,3,4,5];

The localization repository is available on Bower and npm, and has capabilities for module syntax if you are using a bundler such as Browserify in your build process. More information is located in the README of the repository.

Feel free to contribute a locale!

The locale repository can only be great with your help. Our team is adding more localization options, but we also encourage native and non-native speakers to help us to curate a comprehensive list of locales.


comments powered by Disqus