I have a bar graph displaying perfectly, using (jfreechart-1.0.19.jar), in struts 2.5.30 framework. When I try to upgrade jfreechart to version 1.5.3, the graph does not display at all, just a thumbnail there, but no display. No error or anything.
I would like to know if jfreechart-1.5.3.jar works with struts 2
I appreciate for any help or suggestion. Thanks.
I did the following modifications:
. replace jfreechart-1.0.19.jar by jfreechart-1.5.3.jar
. update declare code: import org.jfree.ui.Layer; to -> import org.jfree.chart.ui.Layer;
. add lib xwork-core-2.1.6.jar
. use java jdk-11
Hello everyone,
I have a bar graph displaying perfectly, using (jfreechart-1.0.19.jar), in struts 2.5.30 framework. When I try to upgrade jfreechart to version 1.5.3, the graph does not display at all, just a thumbnail there, but no display. No error or anything.
I would like to know if jfreechart-1.5.3.jar works with struts 2 I appreciate for any help or suggestion. Thanks.
I did the following modifications: . replace jfreechart-1.0.19.jar by jfreechart-1.5.3.jar . update declare code: import org.jfree.ui.Layer; to -> import org.jfree.chart.ui.Layer; . add lib xwork-core-2.1.6.jar . use java jdk-11
My code is exactly like in this url, except the mail function to adapt to struts: http://www.java2s.com/Code/Java/Chart/JFreeChartBarChartDemo1.htm
public String jfreechart_report() throws Exception {
HttpServletRequest req = ServletActionContext.getRequest();
HttpServletResponse res = ServletActionContext.getResponse(); BeanAccount account = GlobalMethods.get_account(req); HttpSession session = req.getSession(); Hashtable<String , Object> hash_params = new Hashtable<String , Object>();
}
private static CategoryDataset createDataset() {
}
private static JFreeChart createChart ( CategoryDataset dataset, ArrayList alist_paging_bean_program_based
)
{
// create the chart... JFreeChart chart = ChartFactory.createBarChart( "Report Program Based (Letter grade) - Display by course", // chart title "Category", // domain axis label "Percentage", // range axis label dataset, // data PlotOrientation.VERTICAL, // orientation true, // include legend true, // tooltips false // URLs );
}