0

get the dates of the X axis with the application locale [closed]

asked 2021-07-28 20:33:09 +0800

softteam gravatar image softteam
120 8

I am using line chart with time data with irregular intervals (https://www.zkoss.org/zkchartsdemo/splineirregulartime) and the dates shown on the X axis are always in English and I want to be able to indicate the language to display according to the iso-369-i locale (https://en.wikipedia.org/wiki/ListofISO639-1codes).

based on the example of zk, does anyone know how?

Thank you

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by cor3000
close date 2021-08-05 11:22:04

Comments

Thanks, it worked

softteam ( 2021-08-04 18:57:57 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-08-02 16:45:51 +0800

cor3000 gravatar image cor3000
6094 2 7
ZK Team

I found no such function in highcharts (the underlying library) The API to provide translations is mentioned briefly in their i18n documentation.

This leads to the lang config object with various attributes.

With the ZK-Charts java API the Lang object is accessible via:

Lang lang = new Lang();
lang.setShortMonths(Arrays.asList(/*your months here*/));
lang.setWeekDays(Arrays.asList(/*your weekdays here*/));
...
Options options = new Options();
options.setLang(lang);
chart.setOptions(options);
link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2021-07-28 20:33:09 +0800

Seen: 9 times

Last updated: Aug 04

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More