掲示板

Chart portlet

thumbnail
16年前 に Rotsen Zerolf によって更新されました。

Chart portlet

Junior Member 投稿: 28 参加年月日: 08/01/16 最新の投稿
Is there a sample portlet displaying pie charts where all we have to do is pluging our data.

I have been trying to create a portlet using Jfreechart but my knowledge of Java and portlets
creation is very bad.

Thanks,

rotseN
16年前 に Ricardo Uhalde によって更新されました。

RE: Chart portlet

New Member 投稿: 9 参加年月日: 07/09/20 最新の投稿
Take a look at BIRT project at http://www.eclipse.org/birt/phoenix/

Its a report solution that you can easily integrate inside a portlet with an IFrame by means of their Web Viewer. BIRT also has one of the best report designers of all, better than jasperreport Ireport.

You can use it to generate many types of charts, pie, bars, gantt, etc. Give it a try, you'll loved as I did.
thumbnail
16年前 に Rotsen Zerolf によって更新されました。

RE: Chart portlet

Junior Member 投稿: 28 参加年月日: 08/01/16 最新の投稿
I am downloading BIRT with everything. My problem is that I do not know how to create a portlet.
There a examples of portlets with JSP file but I do not know how to create a portlet with a Java file and then when I
compile the java file I need to name it as the class is named inside the file, so how do I convert this java file to be
index.jsp which is the default file for portlet. I am also reading about all the different XML files
thumbnail
16年前 に Rotsen Zerolf によって更新されました。

RE: Chart portlet

Junior Member 投稿: 28 参加年月日: 08/01/16 最新の投稿
I created a chart project "myfirstchart" using BIRT. I then use the directory "myfirstchart" were all the files were created
and made it into a zip file. I then uploaded the zip file and I got some errors. Again, I have problems understanding the
XML files in WEB-INF. My errors:

00:03:38,081 INFO [PluginPackageHotDeployListener:74] Reading plugin package for myfirstchart
00:03:38,081 WARN [PluginPackageHotDeployListener:123] Plugin package on context myfirstchart cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
00:03:38,362 INFO [PluginPackageHotDeployListener:187] Plugin package myfirstchart/myfirstchart/unknown/war registered successfully
00:03:38,378 INFO [PortletHotDeployListener:133] Registering portlets for myfirstchart
00:03:38,425 ERROR [HotDeployUtil:60] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for myfirstchart
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for myfirstchart
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:431)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:85)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:42)
at com.liferay.portal.kernel.servlet.PortletContextListener.portalInit(PortletContextListener.java:45)
at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:39)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:52)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.liferay.portlet.WAIFriendlyURLMapper
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:196)
... 16 more


Maybe this means something to some of you experts and can tell me what it is?

thanks,

rotseN
16年前 に Ricardo Uhalde によって更新されました。

RE: Chart portlet

New Member 投稿: 9 参加年月日: 07/09/20 最新の投稿
The fastest and easiest way to code a portlet if you are a newbie, is to use Sun Java Studio Creator. Its all in there, a JSR168 portlet project, a Pluto portal container to debug your portlet, etc.

The only things you need to add to deploy that portlet inside Liferay are liferay-portlet.xml and liferay-display.xml, you can have info of those here in Liferay website.

To download SJSC you need to sign an account in Sun website here http://developers.sun.com/jscreator/downloads/, its free for members.
thumbnail
16年前 に Rotsen Zerolf によって更新されました。

RE: Chart portlet

Junior Member 投稿: 28 参加年月日: 08/01/16 最新の投稿
I will try that.

Gracias,

rotseN
thumbnail
16年前 に Rotsen Zerolf によって更新されました。

RE: Chart portlet

Junior Member 投稿: 28 参加年月日: 08/01/16 最新の投稿
I tried using Sun studio to create portlet and I did the tutorial where you can go from PortltPage1 to PortletPage2
but it did not work going to PortletPage2 but I was able to see PortletPage1. I did the same tutorial about
4 times and every time it did not go to the next PortletPage2. I can feel th ebig L of Looser in my forhead.

I will keep trying :-(
thumbnail
16年前 に Victor Zorin によって更新されました。

RE: Chart portlet

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
Rotsen Zerolf:
Is there a sample portlet displaying pie charts where all we have to do is pluging our data.

I have been trying to create a portlet using Jfreechart but my knowledge of Java and portlets
creation is very bad.

Thanks,

rotseN


Simple to use Liferay portlet package is described at MyOffice24x7 BI Chart Portlets. It also uses JFreeChart for rendering. Deploy Pie Chart (2D or 3D) on your
page and point to a datasource XML file. Chart is re-rendered automatically when datasource file is modified.
thumbnail
14年前 に Juan Fernández によって更新されました。

RE: Chart portlet

Liferay Legend 投稿: 1261 参加年月日: 08/10/02 最新の投稿
Rotsen Zerolf:
Is there a sample portlet displaying pie charts where all we have to do is pluging our data.

Hi!
the best example in Liferay is the Poll portlet, which uses JFreechart and has a few diagrams to choose.
I hope it will be helpful

Greetings
14年前 に Rice Owl によって更新されました。

RE: Chart portlet

Regular Member 投稿: 177 参加年月日: 09/04/24 最新の投稿
Another option you could try is to use a servlet that outputs an image. Then in your JSP, you simply use the <img> tag, call the servlet, and it should render your graph. That way you can have a dynamically created chart fully integrated in your portlet.

The code for your servlet may look like:


response.setContentType("image/png");
JFreeChart myChart = .....;
OutputStream output = response.getOutputStream();
ChartUtilities.writeChartAsPNG(output, myChart, 100, 100);




So if you created a servlet called "MyGraphServlet", in your JSP code, you could simply use:

<img src="<path to servlet>/MyGraphServlet">


You could even pass variables to the servlet if you needed to.

Rotsen Zerolf:
Is there a sample portlet displaying pie charts where all we have to do is pluging our data.

I have been trying to create a portlet using Jfreechart but my knowledge of Java and portlets
creation is very bad.

Thanks,

rotseN
14年前 に Bill Hazard によって更新されました。

RE: Chart portlet

New Member 投稿: 1 参加年月日: 09/03/15 最新の投稿
Rotsen - I like the servlet suggestion. I recently discovered Google Chart API which provides an excellent set of features. So maybe you don't even need to write the servlet!
Bill
thumbnail
14年前 に Ahmed Hasan によって更新されました。

RE: Chart portlet

Expert 投稿: 306 参加年月日: 07/04/13 最新の投稿
I agree with Bill,

With Google Chart API, we dont even need a servlet or an API like JFreeChart. We are implementing Google chart API in one of our projects. In the earlier version of the same project to generate the charts we were using JFreeChart. We see a huge saving in terms of time and effort using Google chart API. It is cool, handy and quite flexible.

For any help feel free to contact me,

Ahmed Hasan
CTO, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
thumbnail
14年前 に Rick Bullotta によって更新されました。

RE: Chart portlet

New Member 投稿: 16 参加年月日: 09/05/03 最新の投稿
Ahmed Hasan:
I agree with Bill,

With Google Chart API, we dont even need a servlet or an API like JFreeChart. We are implementing Google chart API in one of our projects. In the earlier version of the same project to generate the charts we were using JFreeChart. We see a huge saving in terms of time and effort using Google chart API. It is cool, handy and quite flexible.



Hi, Ahmed.

One challenge with using the Google chart API, as I understand it, is that it requires that the server and application have access to the Internet and Google's servers for rendering content (e.g. it is not available offline for intranet or private network applications). Do you know if that is a correct assumption?

Thanks,

Rick
14年前 に Rice Owl によって更新されました。

RE: Chart portlet

Regular Member 投稿: 177 参加年月日: 09/04/24 最新の投稿
Rick, you are right, in order to generate charts you need to be able to call the Google APIs. So your server would need access. Like you said, this can be problematic in intranet portals that may be "locked down" or there could be privacy issues as well. A company may not want to post certain data to an external service and in some cases may not be legal (such as HIPAA issues for medical records).
thumbnail
10年前 に pruthvipatil raj によって更新されました。

RE: Chart portlet

New Member 投稿: 4 参加年月日: 13/05/10 最新の投稿
hello sir,

plz can you tell me how to do chart portlet in liferay.....
13年前 に Vijayalakshmi B によって更新されました。

RE: Chart portlet

New Member 投稿: 1 参加年月日: 11/03/18 最新の投稿
Hi,

I need an example to create a portlet using JFree chart. How to render the chart generated on JSP page. Its urgent. Please help me. Thanks in advance

Viju
thumbnail
12年前 に Dhandapani S によって更新されました。

RE: Chart portlet

Regular Member 投稿: 176 参加年月日: 09/03/24 最新の投稿
Hi Vijayalakshmi,

Why don't you use Google chart portlet, its very flexible compare to jfree chart.

Regards
Dhandapani S
thumbnail
12年前 に Mani kandan によって更新されました。

RE: Chart portlet

Expert 投稿: 492 参加年月日: 10/09/15 最新の投稿
Hi all you can get the war file of Jfreechart. Take it out and modify it as per your requirement.

And also this will helpful for people who wants to use Jfreechart in future
12年前 に Edi Wibowo によって更新されました。

RE: Chart portlet

New Member 投稿: 1 参加年月日: 11/10/30 最新の投稿
Please see an example at https://www.ibm.com/developerworks/mydeveloperworks/blogs/portlet/entry/chart_portlet?lang=en

Regards,
Edi Wibowo
7年前 に Marat Gubaidullin によって更新されました。

RE: Chart portlet

New Member 投稿: 1 参加年月日: 12/10/30 最新の投稿
FYI. Chart portlet is published in Marketplace

https://web.liferay.com/marketplace/-/mp/application/48919330