JSF Chart Creator Component Based on JFreeChart
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
Hi, I am very happy that you liked it. First of all, creating 3d pie charts is not included in the first version, I am planning to include the 3d ones this weekend and hopefully the second version will support them. Other chart types will also be supported in the next versions. Also I think there is a problem with the myFaces integration. IBM implementation works fine.
p.s. First thing to figure out is to find a stable way to upload the chart creator library to internet. Any thoughts? The project has an account in sourceforge but I must learn how to upload files to sourceforge cvs.
Thanks for the appreciation again:)It gives enthusiasm.
p.s. First thing to figure out is to find a stable way to upload the chart creator library to internet. Any thoughts? The project has an account in sourceforge but I must learn how to upload files to sourceforge cvs.
Thanks for the appreciation again:)It gives enthusiasm.
Great product!
I agree too. I think it's a very good product. Cannot wait to see more charts capabilites.
Mona
Mona
error on chartcreator.ChartWriter.doGet()
I'm testing it in a Portlet environment but I get an error.
I'm using Rational Application Developer for Websphere as IDE.
and use WebSphere Portal 5.1 Test Environment
Made de changes in faces-config.xml and web.xml as mentioned in the manual (with the corrections mentioned in this forum)
the columncount and rowcount are shown correctly in the JSF
so, I presume the DataSource is filled correctly. I only get a blank area whe the graph shoud be
I'm using Rational Application Developer for Websphere as IDE.
and use WebSphere Portal 5.1 Test Environment
Made de changes in faces-config.xml and web.xml as mentioned in the manual (with the corrections mentioned in this forum)
the columncount and rowcount are shown correctly in the JSF
so, I presume the DataSource is filled correctly. I only get a blank area whe the graph shoud be
Code: Select all
Servlet Error]-[ChartWriter]: java.lang.NullPointerException
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.NullPointerException.<init>(NullPointerException.java:61)
at chartcreator.ChartWriter.doGet(ChartWriter.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1038)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:603)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java)
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
Also there is an issue with the orientation, if it is not given then the chart is not displayed. I will correct it in the new version. And here are some screenshots that has a 3d attribute. In the new version there is a new attibute calls "is3D". When it is set true, the charts will be in 3D format.






WebSphere
After I posted the message I created a new JSF project in Rational but not as a portlet project. and it works with the sample data from the manual. now try to get it to work with database data and in a portlet, since that is the purpose of my testing. getting graphs into a portlet. When will the new version be available?
There is even another component family that wrap jfreechart in a jsf component family, here is the link:
http://www.jenia.org/jsp/chart.jsf
bye
http://www.jenia.org/jsp/chart.jsf
bye
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
Hi, the new version is coming next week coming with new charts, fixed bugs and 3d charts. Also the component is added to www.jsftutorials.com main page which has a link to this forum.
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
NEW VERSION OF JSF CHART CREATOR
Hi,
The new version is out now, now the component supports a total of "10" charts, chart orientations, 3d charts and more. I have created a page for the component in my blog. All the details, screenshots, manuals and more can be found at;
http://www.jroller.com/page/cagataycivici
Çağatay Çivici
The new version is out now, now the component supports a total of "10" charts, chart orientations, 3d charts and more. I have created a page for the component in my blog. All the details, screenshots, manuals and more can be found at;
http://www.jroller.com/page/cagataycivici
Çağatay Çivici
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm
Hi, I made some small changes;
Here are the current supported charts
Supported Charts
----------------------
* Pie Charts
* 3D Pie Charts
* Bar Charts
* Stacked Bar Charts
* 3D Bar Charts
* 3D Stacked Bar Charts
* Line Charts
* 3D Line Charts
* Area Charts
* Stacked Area Charts
at:
http://www.jroller.com/page/cagataycivi ... rt_creator
Here are the current supported charts
Supported Charts
----------------------
* Pie Charts
* 3D Pie Charts
* Bar Charts
* Stacked Bar Charts
* 3D Bar Charts
* 3D Stacked Bar Charts
* Line Charts
* 3D Line Charts
* Area Charts
* Stacked Area Charts
at:
http://www.jroller.com/page/cagataycivi ... rt_creator
File "/WEB-INF/tld/chartCreator.tld" not found
Hello cagatay_civici,
i am eagerly waiting to get this graph done...but the problem goes so..
javax.servlet.ServletException: java.lang.ClassNotFoundException: chartcreator.ChartWriter
javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
I got the above problem when i tried to acces the linechart.jsp file which containing the below code
and my java bean is here
i declared the bean in faces-config.xml file and also the component as u mentioned in the documentation...
even added the below code to web.xml file
and copied the all of the jars to lib and also to classpath..
its not serlvet project but its an EJB project... and i get the above error... saying it cant find the class chartcreater
javax.faces.FacesException: java.lang.ClassNotFoundException: chartcreator.ChartWriter
and even the tag is also not detected..
thanku verymuch for providing these kind of tags for free...
looking forward...
Satish, Germany.
PS: early response is appreciated..
i am eagerly waiting to get this graph done...but the problem goes so..
javax.servlet.ServletException: java.lang.ClassNotFoundException: chartcreator.ChartWriter
javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
I got the above problem when i tried to acces the linechart.jsp file which containing the below code
Code: Select all
<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="/WEB-INF/tld/chartCreator.tld" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<f:view>
<c:chartCreator id="charter1" title="EXAMPLE CHART"
datasource="#{DBMgrChartcreator.source}"
type="line"
orientation="VERTICAL"
background="white">
</c:chartCreator>
</f:view>
Code: Select all
import org.jfree.*;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultKeyedValueDataset;
public class DBMgrChartcreator
{
public DefaultCategoryDataset getChartcretor() throws Exception
{
String series1 = "A";
String series2 = "B";
String series3 = "C";
//column keys...
String category1 = "1990";
String category2 = "1995";
String category3 = "2000";
String category4 = "2005";
DefaultCategoryDataset source = new DefaultCategoryDataset();
source.addValue(1 , series1, category1);
source.addValue(2 , series1, category2);
source.addValue(2.3 , series1, category3);
source.addValue(3.2 , series1, category4);
source.addValue(2.1 , series2, category1);
source.addValue(3.5 , series2, category2);
source.addValue(2 , series2, category3);
source.addValue(4.5 , series2, category4);
source.addValue(6 , series3, category1);
source.addValue(4 , series3, category2);
source.addValue(2 , series3, category3);
source.addValue(5.3 , series3, category4);
return source;
}
}
i declared the bean in faces-config.xml file and also the component as u mentioned in the documentation...
even added the below code to web.xml file
Code: Select all
<servlet>
<servlet-name>ChartWriter</servlet-name>
<servlet-class>chartcreator.ChartWriter</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ChartWriter</servlet-name>
<url-pattern>/servlet/ChartWriter</url-pattern>
</servlet-mapping>
and copied the all of the jars to lib and also to classpath..
its not serlvet project but its an EJB project... and i get the above error... saying it cant find the class chartcreater
javax.faces.FacesException: java.lang.ClassNotFoundException: chartcreator.ChartWriter
and even the tag is also not detected..
thanku verymuch for providing these kind of tags for free...
looking forward...
Satish, Germany.
PS: early response is appreciated..
Displays blank chart
Hi,
ANy updates on the issue reported by Seamus & Bruce? I seem to have the same issue - the chart is displayed with title & borders, but no figure / data.
Thanks,
Maha
ANy updates on the issue reported by Seamus & Bruce? I seem to have the same issue - the chart is displayed with title & borders, but no figure / data.
Thanks,
Maha
-
- Posts: 54
- Joined: Sun Aug 28, 2005 8:13 pm