How to get viewData from a chart

asked 2020-12-15 19:13:30 +0800

softteam gravatar image softteam
130 1 8


We have a chart like this:

image description

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()"));

private MenuItem customMenuItem(String text, String onclickJS) {
        MenuItem menuItem = new MenuItem();
        menuItem.setOnclick(new JavaScriptValue("function(evt) {" + onclickJS + "}"));
        return menuItem;

And we can see:

image description

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 versions.

Thank you, Javier

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-17 17:57:54 +0800

hawk gravatar image hawk
3205 1 5
http://hawkphoenix.blogsp... ZK Team

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.

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




Asked: 2020-12-15 19:13:30 +0800

Seen: 8 times

Last updated: Dec 17 '20

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