ZK Charts Emptymessage

asked 2014-07-01 10:42:18 +0800

IngoB gravatar image IngoB flag of Germany
256 6

updated 2014-07-01 10:43:17 +0800


i just read the ZK Charts 1.1.0 release notes and was happy about:

ZKCHARTS-7: Support show customizable empty message when chart model is empty

So I searched the javadoc for "emptyMessage" or something (like grid.setEmptyMessage()/listbox.setEmptyMessage()) but i couldn't find anything.

Has anyone found out, how to set the message?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-07-02 04:14:13 +0800

neillee gravatar image neillee flag of Taiwan
1692 1 5

The "no data" message would be displayed when the chart model contains no data points to plot. You also need to set the changed options back to charts for the custom "no data" message to take effect. The default "no data" message is "No data to display".

The usage for this feature would be

Options options = charts.getOptions();
if (options == null) options = new Options();

Lang lang = options.getLang();
if (lang == null) lang = new Lang();

lang.setNoData("Custom Empty Message");
link publish delete flag offensive edit


Thank you :) It's working!

IngoB ( 2014-07-02 07:54:35 +0800 )edit

answered 2014-07-01 10:45:14 +0800

IngoB gravatar image IngoB flag of Germany
256 6

updated 2014-07-01 10:52:01 +0800

Ok, nevermind ...

Lang language = new Lang();
language.setNoData("No Data found");

Mhh, but when is it displayed? I created a "fresh" chart, set the language and no message is displayed? Is the "emtpyMessage" not like in grid/listbox?

link publish delete flag offensive 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

1 follower



Asked: 2014-07-01 10:42:18 +0800

Seen: 30 times

Last updated: Jul 02 '14

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