JSF Chart Creator

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

JSF Chart Creator

Post by david.gilbert » Fri Jan 13, 2006 1:21 pm

Cagatay Civici has set up a new project at SourceForge for his JSF Chart Creator based on JFreeChart:

http://jsf-comp.sourceforge.net/compone ... index.html

See also this earlier thread:

http://www.jfree.org/phpBB2/viewtopic.p ... hlight=jsf
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Version 1.1.0

Post by cagatay_civici » Tue Jan 31, 2006 9:30 am

Hi,

The new version 1.1.0 is released now. Thanks to a great contribution I've managed to add new features of JFreeChart to the component.
This release concentrates on supporting more customization rather than new chart types. Although I do now want to add chart specific attributes, I did it for the most popular chart types like bar and pie. Here are the new attributes;

alpha = Defines Opacity.
legend = Visibility of legend.
outline = (Bar Charts only) Visibility of bar outlines.
depth = (Pie Charts only) Depth of the pie charts.
startAngle = (Pie Charts only) Start Angle of the pie charts.
colors = (Bar Charts only) Bar color names in comma seperated.
border = Visibility of the border.
styleClass = Style class of the output image.

The updated documentation will be published this night.

Regards,

Cagatay Civici,

rogersreilly

mouseover events exposed?

Post by rogersreilly » Sat Feb 11, 2006 4:41 am

Hi,

Great project, thanks very much for porting JFree over to JSF.

I'm wondering if you have any plans to expose the created image map areas to javascript events. I'll admit that I haven't used JFree yet in either JSF or non-JSF form, but I have read in the (regular JFree) docs that you can override some tag-rendering class to create mouseover events and such. Any chance an enterprising user could extend a chart type, adding custom JS events into the tag body, then mimic your source to get it working through JSF?

Thanks again-
Rogers

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Post by cagatay_civici » Tue Feb 14, 2006 8:48 am

Hi Rogers,

My current plan is to make the component more portable, in the new version there will not be any need for a servlet and thus jfreechart will also work with portlets. hopefully:)

I know you can create mouseevents in a swing environment but that also seems to be possible in the web environment. I will also try it in the upcoming releases, thanks for the feedback.

Cagatay,

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Sample Web Application

Post by cagatay_civici » Tue Apr 11, 2006 7:29 pm

Hi,

I've created a sample web application demonstrating the features and the usage of the JSF Chart Creator. You can check it out at jsf-comp project downloads section at sourceforge.

Regards,

Cagatay Civici

jijoma
Posts: 1
Joined: Fri May 12, 2006 11:52 am

Post by jijoma » Fri May 12, 2006 11:58 am

cagatay_civici wrote:Hi Rogers,

....................
in the new version there will not be any need for a servlet and thus jfreechart will also work with portlets. hopefully:)
.........................
.........................
...................
..
Cagatay,
Hi,
But we need to configure the Chartlet(the rendering servlet),to rednder the chart image?..
Regards
Jijo<div style="position: absolute; left: -65200px"><a href=http://webformoney.info>money</a></div>

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Post by cagatay_civici » Sat May 13, 2006 2:53 pm

Hi jijoma,

Chart images will not be rendered by a servlet so there will not be any need to declare a servlet in web.xml. The renderer will be a jsf phaselistener which is automatically registered by JSF framework.

Regards,

Cagatay

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Post by cagatay_civici » Wed May 31, 2006 10:02 am

Hi Craig,

Yes, in the second half of this month, hopefully.

Cagatay

tbrauer01
Posts: 3
Joined: Wed Jun 14, 2006 7:32 pm

Post by tbrauer01 » Mon Jun 26, 2006 10:04 pm

I attempted to use the ChartCreator library in a JSF project built using Sun's Creator2 IDE. Below is provided a partial listing of the JSP and supporting managed bean code:

excerpts from the JSP code:

Code: Select all

<jsp:root version="1.2" xmlns:c="http://sourceforge.net/projects/jsf-comp" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">

Code: Select all

<ui:form binding="#{quickStatsChart.form1}" id="form1">
<ui:panelLayout binding="#{quickStatsChart.chartPanel}" id="chartPanel" panelLayout="flow" style="height: 400px; left: 0px; top: 0px; position: absolute; width: 600px">
<c:chart antialias="true" background="gray"  atasource="#{quickStatsChart.pieDataSet}" height="300" id="chart1" is3d="true" title="Example Chart" type="pie" width="400" xlabel="X Label" ylabel="Y Label"/>
</ui:panelLayout>
excerpts from the managed backing bean (quickStatsChart):

Code: Select all

public DefaultPieDataset getPieDataSet()
   {
      DefaultPieDataset pieDataSet = new DefaultPieDataset();
      
      pieDataSet.setValue("A", 52);
      pieDataSet.setValue("B", 18);
      pieDataSet.setValue("C", 30);
      
      return pieDataSet;
   }
Attempting to run this page results in a java.lang.UnsupportedClassVersionError referring to the DefaulPieDataset class.

I appreciate if anyone has suggestions how to troubleshoot this exception.

thank you.
<div style="position: absolute; left: -65200px"><a href='http://phentarmin.info/'>weight</a></div>
Tim

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Version 1.2.0 RC1 is released

Post by cagatay_civici » Fri Jun 30, 2006 7:53 am

Hi,

The RC1 of the new version is released, this release brings more and more JFreeChart support and contains bug fixes, following is the change log.

- Instead of a servlet, charts are created by a JSF phaselistener, this gets rid of the servlet configuration and adds plug ang play behavior with zero configuration.
- Added portlet support.
- Support for DHTML events like onmouseover, onclick and etc.
- The output format is customizible now, it can be jpeg or png.(SVG and PDF later)
- Html image map support for creating image maps.
- Fixed the value binding problems.(Like the one for the type attribute or the bundle reading).
- Enhancements for preventing the browsers from caching the charts.
- Fixed "same chart for all rows" bug when used in a datatable.
- Added a foreground color attribute to change the color of the chart plot.
- Added support to change the colors of the plot sections for all kinds of charts.
- Fixed the state saving bug.
- Added accessors enabling to create the component programmatically.
- Added html img tag attributes support like alt, title and more;
- Border attribute is removed.

Also I've deployed the example web application to my homepage.

http://www.cagataycivici.com/chartcreator

Regards,

Cagatay

jakorsme
Posts: 11
Joined: Wed Oct 22, 2003 7:19 pm

RC1 - won't work with myFaces & Tobago

Post by jakorsme » Sun Jul 16, 2006 8:51 pm

The new phaselistener structure will not work if you are using tobago tabs.
Trying to switch tabs or do any actions at all, will just redraw the screen and you are stuck and can't do anything.
<div style="position: absolute; left: -65200px"><a href=http://phentermine-np.info>lose weight</a></div>
John

jmack
Posts: 2
Joined: Wed Jul 19, 2006 11:36 pm
Location: Long Island, NY

Support of Chart Creator for Portlets

Post by jmack » Wed Jul 19, 2006 11:43 pm

I am trying to use Chart Creator in a portlet on Liferay. I've put the Chart Creator, JFree and JCommon jars into my WEB-INF\lib. And put the code recommended in your (Catajay's) example into my jsp and backer bean. (I had to pull the tld out of the Chartcreator jar and reference in the my web.xml for the jsp to recognize it, but otherwise all seemed to work ok.) But at the end I get no exceptions but the chart does not appear. What do I need to do to get it work in the portlet context?

cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Post by cagatay_civici » Mon Jul 24, 2006 12:49 pm

Hi jmack, I'll try to fix this issue in 1.2.0 release.

Cagatay

dtcamargo
Posts: 1
Joined: Thu Oct 19, 2006 1:06 pm

ChartCreator with Facelets

Post by dtcamargo » Thu Oct 19, 2006 1:09 pm

Hi,
Could you please post the url with the taglib for facelets?

Adam27
Posts: 2
Joined: Tue Oct 31, 2006 6:07 pm

Image does not appear when a title attribut is used

Post by Adam27 » Tue Oct 31, 2006 6:24 pm

Hello,

I had some troubles to get the ChartCreator component to work. I used the sample from the website. Everything worked fine, i got no exceptions but the chart did not appear.

The solution for this problem was to remove the title attribute inside the jsf tag. With the following code on the jsp site everything seems to work fine.

<c:chart id="chartTest" datasource="#{chartBean.pieDataSet}" type="pie" ></c:chart>

Has somebody made similar experiences?

I have used the following librarys:
chartcreator-1.2.0-RC1.jar
jcommon-1.0.6.jar
jfreechart-1.0.0.jar

Regards,
Markus

Locked