-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
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?
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");
options.setLang(lang);
chart.setOptions(options);
Ok, nevermind ...
Lang language = new Lang();
language.setNoData("No Data found");
charts.getOptions().setLang(language);
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?
Asked: 2014-07-01 10:42:18 +0800
Seen: 37 times
Last updated: Jul 02 '14