0

Zkcharts and localization

asked 2014-05-15 10:47:08 +0800

enixser gravatar image enixser
185 3

Is there a way to localize strings used in Zkcharts, e.g. weekdays in datetime axis?

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
1

answered 2014-05-15 12:19:57 +0800

RaymondChao gravatar image RaymondChao
386 1 4

Hello,

Lang class can be used to localize string. For example:

Options options = new Options();
Lang lang = options.getLang();
String[] weekdays = {"星期一", "星期二", "星期三", "星期四", 
    "星期五", "星期六", "星期日"};
lang.setWeekdays(Arrays.asList(weekdays));
chart.setOptions(options);

And you can use DateTimeLabelFormats to change Axis's date format when its type is datatime.

link publish delete flag offensive edit

Comments

Thank you. That works.

Unfortunately, when I set the options of the chart (I create a new object and only set the Lang object as in your example) I get additional lines in the chart. It seems that some of the points are connected, maybe the first with the last.

enixser ( 2014-05-16 10:02:37 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-05-15 10:47:08 +0800

Seen: 10 times

Last updated: May 15 '14

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