-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
We have a chart like this:
And we want to show the data from this chart in a window. We can show now this Data below the chart using:
Charts chart;
...
Exporting export = chart.getExporting();
ExportingButton buttons = new ExportingButton();
List<MenuItem> menuItems = new ArrayList<>();
menuItems.add(customMenuItem("Ver datos", "this.viewData()"));
buttons.setMenuItems(menuItems);
export.setButtons(buttons);
private MenuItem customMenuItem(String text, String onclickJS) {
MenuItem menuItem = new MenuItem();
menuItem.setText(text);
menuItem.setOnclick(new JavaScriptValue("function(evt) {" + onclickJS + "}"));
return menuItem;
}
And we can see:
But, which is the easiest way to get this data to show it then in a window using Java?
We use ZK 9.1.0 and chart 7.2.1.1 versions.
Thank you, Javier
I have mentioned to your colleague. Currently, you render those data in javascript.
But you can add a menu item to fire an event to the server and implement the data rendering logic in Java. So that you can create a ZK Window dynamically in Java.
Or just add <window visible="false">
in the zul and make it visible when rendering data.
Asked: 2020-12-15 19:13:30 +0800
Seen: 8 times
Last updated: Dec 17 '20