留言板
Liferay jfree chart is not working in life ray 5.1.2
Kiran Kumar Boyini,修改在12 年前。
Liferay jfree chart is not working in life ray 5.1.2
Expert 帖子: 287 加入日期: 11-6-2 最近的帖子
Hi All,
I am working on the life ray 5.1.2.
I have requirement I want to display the using liferay jfree chart.
I have used the code as life ray people using in admin portlet. In that they are using the jfree chart to show the memory status.
In Jsp I have written the following code to display the pie chart :
--------------------------------------
<%
out.println("This is inside the feed back reports");
DefaultPieDataset pieDataset = new DefaultPieDataset();
pieDataset.setValue("Poor", new Integer(10));
pieDataset.setValue("Good", new Integer(20));
pieDataset.setValue("Excellent", new Integer(30));
pieDataset.setValue("Satisfactory", new Integer(10));
JFreeChart chart = ChartFactory.createPieChart ("User feed backs with respect to rating wise",pieDataset, true,true,true);
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<img border="0" src="<%= themeDisplay.getPathContext() %>/display_chart?filename=<%= ServletUtilities.saveChartAsPNG(chart, 280, 180, null, null) %>" />
</body>
</html>
--------------------------
But when I am using the above code it is not displaying the chart in jsp,But it is storing inside the location "bundles\tomcat-6.0.16\temp".
Please find the following attachments you will know more about this problem.
Please give the solution for this problem.
Thanks & Regards
Kiran Kumar Boyini.
I am working on the life ray 5.1.2.
I have requirement I want to display the using liferay jfree chart.
I have used the code as life ray people using in admin portlet. In that they are using the jfree chart to show the memory status.
In Jsp I have written the following code to display the pie chart :
--------------------------------------
<%
out.println("This is inside the feed back reports");
DefaultPieDataset pieDataset = new DefaultPieDataset();
pieDataset.setValue("Poor", new Integer(10));
pieDataset.setValue("Good", new Integer(20));
pieDataset.setValue("Excellent", new Integer(30));
pieDataset.setValue("Satisfactory", new Integer(10));
JFreeChart chart = ChartFactory.createPieChart ("User feed backs with respect to rating wise",pieDataset, true,true,true);
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<img border="0" src="<%= themeDisplay.getPathContext() %>/display_chart?filename=<%= ServletUtilities.saveChartAsPNG(chart, 280, 180, null, null) %>" />
</body>
</html>
--------------------------
But when I am using the above code it is not displaying the chart in jsp,But it is storing inside the location "bundles\tomcat-6.0.16\temp".
Please find the following attachments you will know more about this problem.
Please give the solution for this problem.
Thanks & Regards
Kiran Kumar Boyini.