View Full Version : Passing Data to a line or Barchart

07-26-2007, 09:21 AM

I have a JSP page that runs a mysql query and stores the data in a ResultSet. I want to be able to format this data and pass the formatted data in possibly an array to the line or barchart chart. Is this possible?

thanks again
regards, Mike

07-27-2007, 02:55 AM
Hi Mike,

the Pentaho BI Plattform offers two ways to display charts on a JSP page, although both handle the MySQL query outside the JSP page:

1. Have a look at the SampleDashboard.jsp. It uses chartHelper functions to create charts. The charts are defined in widgets and an action sequence retrieves the data from the data base.

2. Have a look at Pentaho's AJAX API documentation. Here an action sequence is used to retrieve the data and build the chart. The JSP page uses the AJAX API to execute the action sequence and gets the chart as a result.

In an after thought you migt be able to use approach 2 and pass a ResultSet as an parameter to the action sequence instead of retrieving the data within the action sequence. But as far as I know you can't pass an array!?!

Well, I hope these hints will help you to solve your problem anyway.

All the best,