JSF CHART CREATOR

I have searched for a jsf chart component on web but end up with one or two commercial ones whose prices are around thousands of dollars, so I have created my own component:) JSF Chart Creator is an open-source free JSF component that can display various types of charts in a JSF web application, the chart creation engine is based on famous JFreeChart. In addition the component supports portlets.(from 1.2.0)

Supported Charts

  • Pie Charts
  • 3D Pie Charts
  • Bar Charts
  • Stacked Bar Charts
  • 3D Bar Charts
  • 3D Stacked Bar Charts
  • Area Charts
  • Stacked Area Charts
  • Line Charts
  • 3D Line Charts
  • Waterfall Charts
  • Time Series Charts
  • XYLine Charts
  • Polar Charts
  • Ring Charts
  • Scatter Charts
  • XYArea Charts
  • XYStep Area Chart
  • XYStep Charts
  • Bubble Charts
  • Candle Stick Charts
  • Gantt Charts
  • Box and Whisker Charts
  • High and Low Charts
  • Histogram Charts
  • Signal Charts
  • Wind Charts

Attributes

The component has several attributes for customizing the chart’s properties like type, datasource, colors, dhtml events, image maps, 3d, antialias, styleclass and more. Refer to the documentation for the whole list.

Online Demo

Check out the online example to see the chart creator in action

Here is a portion of the configuration screenshot from the IBM’s WSAD;

Referrers

There are references to the component at jfree.org , jsfTutorials.net and jsfcentral.com.

Some Screenshots

    

Download

40 Responses to JSF CHART CREATOR

  1. Alex says:

    This could be just what I am looking for. I have followed all of your instructions in the manual I just can’t find chartCreator.tld

    Could you tell me where I can get hold of it or could yo e-mail me a copy of the file.

    Many Thanks

    Alex…

  2. Andrew Farrow says:

    Will you be uploading the source to sourceforge?

    Also what is the license- GPL, LGPL etc

    regards

    Andrew Farrow

  3. Anonymous says:

    It seems that it doesnot support multi-languange.

  4. lin says:

    Hello cagatay_civici,

    My applicaiton is running under WSAD 5.1.2 and I have followed all the instructions on the doc, copy the three jars files under WEB-INF/lib and I have created the Managed Bean.
    But the application just doesn’t work.

    your help is highly appreciated

    Thanks

    Lin

    here is the error msg

    WebGroup E SRVE0026E: [Servlet Error]-[Expression Error: Named Object: ‘chartCreator’ not found.]: javax.faces.FacesException: Expression Error: Named Object: ‘chartCreator’ not found.

    here is my simple JSP file.
    < %@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    < %@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    < %@ taglib uri="/WEB-INF/tld/chartCreator.tld" prefix="c" %>

  5. legolas woodland says:

    hi
    Thank you for the component.
    do you come to a solution to use this component in a jsf portlet ?
    do you come to a plan to make it portlet friendly ?
    Im hardly waiting to use it in my portlet🙂

  6. Cagatay Civici says:

    hi legolas,
    Portlets are my next aim, I was busy with integrating the component to jsf-comp project in sf.net. As I said, when I had time I will try to make it work with portlets.Regards,

  7. legolas woodland says:

    Sorry if i am asking ,
    can you please tell me an estimation about Date ?
    Right now im working on a portlet based on jsf .
    I tried some other charting like CEWorlf , jenia4faces with no luck.

    if i know that this will become available i can work on other aspect of my software and put the Chart for last steps.

    Thank you again.

  8. Avatar Ng says:

    I’ve created JFreeChart Servlet myself, and I do not like the slow response. I found this JSF implementation here, is it AJAX enable?

    If it is not, then I will have to create one which fetch data remotely to draw chart.

    Anyone else face the problem with performance?

  9. adr says:

    jesus this is realy cool one !

  10. prophet says:

    I am interested in using this component in my JSF development, but need to obtain the ImageMap text that is produced by JFreeChart. Is that possible with your code?

  11. Cagatay says:

    Unfortunately, it is not (for now).

  12. Palix Banda says:

    Hi cagatay,

    I am trying to get the example in the jsf-comp page run.
    For taglibs I used:
    < %@taglib uri="http://sourceforge.net/projects/jsf-comp" prefix="c" %>

    During the runtime I get the following error:
    org.apache.jasper.JasperException: The absolute uri: http://sourceforge.net/projects/jsf-comp cannot be resolved in either web.xml or the jar files deployed with this application.

    The solution I think is to put a tld file in the
    WEB-INF like:
    < %@ taglib uri="/WEB-INF/tld/chartCreator.tld" prefix="c" %>

    But a file named “chartCreator.tld” is missing in your package. Should I create one?
    If you have already one please send it to me via
    email:
    My Email palix.banda@web.de
    Many thanks in advance.
    Palix

  13. Cagatay says:

    Hi Palix, the package contains a “chartcreator.tld” file under META-INF. I’ve never been for an error like that.

  14. rooger says:

    Result running application, what’s happen?

    java.lang.NullPointerException
    at net.sf.jsfcomp.chartcreator.Chartlet.doGet(Chartlet.java:74)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)

  15. gani says:



    hi cagatay

    i am using the sun creator ide to develop some jsf web apps i am required to have some charts in my apps i am new to jsf , sun creator (only a few days) i would be very greatfull if u could give me some guidence and tips on using jfree library with the sun creator …
    with regards
    gani

  16. Cagatay says:

    I’m not using sun creator but you can check out the documentation at jsf-comp to use the chart component.

  17. Matt says:

    Hi !
    Great job Cagatay !
    How can I customize the Y axis displayed values on a bar chart ? For example if I want to show only 0, 1, 2, 3 … not 0.5, 1.5

  18. keith b says:

    Great work. Thanks.

    Have got this working in tomcat 5.5 but would like to get it working as a portlet in jetspeed2. Have tried both the SUN RI and myfaces jsf-portlet bridges but to no avail. Has anybody manged to get Cagatays component implemented as a JSF-Portlet?

  19. Cagatay Civici says:

    Hi Matt, I dont think it is possible for now, but I should add this customization feature in the new release. For now maybe you should edit the chartlet class and use your own edited chart creator servlet.

  20. Cagatay Civici says:

    Hi Keith, there is a portlet restriction for now. The charts are generated in an servlet environment.This issue was my priority and solved it using a phaselistener rather then using servlet, so there is no dependency for a servlet now. Unfortunately I cannot find enough time to create a new version with this fix because of some other open source stuff.Stay tuned, portlet support is coming:)

  21. Bernie says:

    Hello Cagatay, how are you going with the new phaselistener release? Can I offer my assistance. Remeber I am the guy how contributed files for facelets.
    Take care (Greetings from Australia)

  22. Cagatay says:

    Hi Bernie, of course I remember. I am currently busy with the client validation stuff for myfaces and some other stuff. I’m not touching chart creator for a long time. There are many more new features in my mind but just done have time to implement. I’d be glad if you have the time to contribute.You know my mail address;)

  23. sriharsha says:

    hi ,
    is there any way to display the label of x-axis vertically i have an application in which i am using time as x-axis elelment so after 5 or more steps the time is being dispalyed like
    12:12.. 12:13.. like this so i wanna display it vertically ! is this possible using jsfchartcreator?????

  24. Cagatay says:

    Yes, this is why the orientation attribute for. orientation is by default horizontal, you can change it to vertical using the attribute.

  25. Satish says:

    Hi,
    Thanks for the cool JSF component🙂
    How do I implement logarithmic axis in JSF bean?

  26. jenny says:

    i want to with chart creator create a chart with secondaryDataset, how to do it….?

  27. ishkin says:

    Hi Cagatay,
    thanks for the really cool component!
    I’ve seen talks about portlet support from January and April-wanted to ask if it’s ready yet?

    Thanks a lot!

  28. Cagatay says:

    Hi, I’ve done some work in the latest release(1.2.0 RC1) for portlet support, but some users reported errors. I’ll try to fix them in 1.2.0 which will probably be released next month.

  29. Di says:

    I like this cool component. Got it working with JSF(myfaces) with tomcat, couldn’t get it to work in portlet under liferay, sames like when it’s in portlet, part of the chart image reference get chopped off. My guess is if I modify net.sf.jsfcomp.chartcreator.UIChart to add back the chopped off reference like: “proj/faces/html/…” to the src, it would work.
    Hmmm, it would be nice if it’s added as an “”src” attribute in the chartcreator.tld then append that to the src in UIChart.

  30. Ruben Mendes says:

    Hi,

    I´m trying to creat a box-and-Whisker chart and i´ve executed the code below:

    public BoxAndWhiskerCategoryDataset getTimePerState2Dataset() {

    final int seriesCount = 3;
    final int categoryCount = 4;
    final int entityCount = 22;

    final DefaultBoxAndWhiskerCategoryDataset dataset
    = new DefaultBoxAndWhiskerCategoryDataset();
    for (int i = 0; i < seriesCount; i++) { for (int j = 0; j < categoryCount; j++) { final List list = new ArrayList(); // add some values... for (int k = 0; k < entityCount; k++) { final double value1 = 10.0 + Math.random() * 3; list.add(new Double(value1)); final double value2 = 11.25 + Math.random(); // concentrate values in the middle list.add(new Double(value2)); } log.debug("Adding series " + i); log.debug(list.toString()); dataset.add(list, "Series " + i, " Type " + j); } } return dataset; } I dont have any compilation erros but i´cant get the chart image, but with other jenia charts it doesn´t happens. Can you help me. Thanks

  31. Thiago Santos says:

    Hi i got the same question as Ruben Mendes. My problem is that the image is not rendering. I executed the example code and all the instructions from the JSF-Comp Manual but still couldn’t get the image to render.

    Can anybody help on this? Thanks

  32. Dorin Iova says:

    Hi! i have the same problem…i can’t get the image to render…it simply doesn’t show, as if the browser couldn’t find it.

  33. nsn says:

    Good day!
    ———————————————
    Firstly, sorry for my english🙂

    I am about JSF ChartCreator. Mr. Civici, your component is nice.
    But i have a big problem. I can’t use it with Apache Myfaces!

    I download your test webapp chartcreator-webapp-1.2.0-RC1.war and deploy it on tomcat 5/6. And it’s works. And it is on SUN Reference JSF impl, isn’t it?
    =============================================
    I have my own webapp with Myfaces (and with my own components). I have tried to make JSF-page with your component (Certainly, i download chartcreator-1.2.0-RC1.jar before). I did it exactly as your description on web page – http://jsf-comp.sourceforge.net/components/chartcreator/index.html, and i have no result. All what i see – blank white placeholders for images (that does not rendered at all) with small red cross in upper left corner. The cross is breaked as image is lost. AND I HAVE NO ERRORS in tomcat console!!

    Probably, some people have the same problem – IMAGES DOES NOT RENDER:((

    I need to link Your component with Myfaces. If I do something wrong, please tell me. And if you can, give me a step-by-step instruction how to make it works. What JAR libraries(exactly, everithing, by name), and accordingly, contents of web.xml (especially about listeners).
    =============================================
    It’s very important for me. Thank you for answer! I am waiting for it..

  34. Lionel says:

    The clearing of the chart data from the session after rendering the chart will mean that a NullPointerException is thrown if use the view image option in firefox’s context menu or try and print the image in IE.

  35. Anonymous says:

    Hi,
    I am beginner of jsf.I am using this chartcreator,but I want this should be dynamic,actually I want to use ajax and using ajax I recieve a new dataset for each request and using javascript I assign this dataset to datasource of tag ,but there is no changes in chart,can help me
    Thanks
    My EmailId: kmallik_01@rediffmail.com

  36. Bezi says:

    I also would like to know how to use it with AJax, beacause the datas i get are dynamically changed, and the charts should be rendered again….

  37. Marcos says:

    Hi mr. Civici:
    The component’s new version has been released. Thank you!! I have a question about it: Does it work on portlets? I tried the example that comes in the jsf-comp page, but it doesn’t work in my portlet. Also, I found a jsfcc.rar link in some forums, but the file doesn’t exist.

    Tanks!!

  38. loboRenegado says:

    Hi Cagatay Civici

    I need make a Overlayed Chart (Bar and Line) with independent axis (one at left and the other at right side).

    can I do it with JSF CHART CREATOR ?

  39. Pingback: links for 2008-02-12

  40. Is there a way always have the values in the scale on the y-axis (labels??) range from 0 to 100?

    The values on the y-axis seem to “float” based on the min/max values being charted and so this sometimes gives a false impression when comparing charts with different actual data ranges.

%d bloggers like this: