JSF Chart Creator

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
cagatay_civici
Posts: 54
Joined: Sun Aug 28, 2005 8:13 pm

Post by cagatay_civici » Tue Dec 05, 2006 10:20 pm

Hi, The facelets taglib is at facelets home page.

http://wiki.java.net/bin/view/Projects/ ... aglibFiles

joystar
Posts: 1
Joined: Thu Dec 07, 2006 12:07 pm

Is there any Struts based Brother?

Post by joystar » Thu Dec 07, 2006 12:23 pm

Hi,

This project could have fit my application requirements if I haven't had deployment constraints, so I'm wondering if there is a Struts project with the same aim.

Thanks in advance.

jrenck
Posts: 2
Joined: Thu Dec 14, 2006 4:44 pm

CategoryLabelPositions

Post by jrenck » Thu Dec 14, 2006 4:48 pm

Excellent job, a real life saver!.

Do you have any plans to support CategoryLabelPositions?

Thanks!

Johann

gus315
Posts: 5
Joined: Wed Dec 27, 2006 4:29 am

Integrate Jfreechart into ICEfaces

Post by gus315 » Wed Dec 27, 2006 9:53 pm

Hi,

I found that ICEfaces successfully integrated krysalis-jCharts, and it runs great. However, the krysalis-jCharts had very limited chart types and also the krysalis-jCharts project had been closed three years ago, I am wandering whether it is possible to integrate jfreechart into ICEfaces. Thank you.

tfritsch
Posts: 2
Joined: Tue Apr 13, 2004 2:39 pm

Tooltips from JSF chartcreater component

Post by tfritsch » Fri Jan 26, 2007 4:46 pm

First things first - Cagatay, thanks so much for all of the hard work in delivering the JFreeCharts via JSF (and thanks to David for delivering JFreeCharts). The JSF model simplifies their use for web applications greatly!

I see that you've implemented a usemap attribute in the component, which from the examples I see can only specify a name of a map generated elsewhere in the page. Are there any plans (or is it already possible) to use the chartcreater component to generate an image map that contains Tool Tip information?

In a "homemade" web application (non-JSF), I used the StandardXYToolTipGenerator for the renderer on XY charts (StandardXYItemRenderer or something). I think I may have had to render the chart twice (once to get the image and once to get the map), but it was nice to have the mouseover tooltips to get exact values on the chart images (and the overhead was pretty negligible).

Apologies for the long post, just curious about doing this with JSF...

Thanks again,
Ted

thisWontHurtABit
Posts: 4
Joined: Mon Feb 12, 2007 12:41 pm
Location: Vienna / Austria

Post by thisWontHurtABit » Mon Feb 12, 2007 12:55 pm

hello everybody,

sorry to bother you all, but I seem to be having an old well-known problem here - ChartCreator seems to work fine, no exceptions appear, the getter in the backing bean is accessed - but no chart appears.

I've worked through all your suggestions, but nothing seemed to work. Probably I have overseen some trivial thing, I just don't know what that might be.

The facts are:
Facelets (I've included the taglib!)
chartcreator-1.2.0-RC1.jar
jcommon-1.0.6.jar
jfreechart-1.0.0.jar

.xhtml snippet:

Code: Select all

<div class="boxco">
		<div class="contentheader"></div>
<c:chart id="chartTest" datasource="#{controller.dataset}" type="pie"></c:chart>
</div>
getter in the backing bean:

Code: Select all

	public DefaultPieDataset getDataset() {
		dataset = new DefaultPieDataset();
		dataset.setValue("A",52);
		dataset.setValue("B", 18);
		dataset.setValue("C", 30);
		return dataset;
	}
web.xml-snippets:

Code: Select all

...
 <context-param>
  <param-name>facelets.LIBRARIES</param-name>
  <param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/chartcreator.taglib.xml</param-value>
 </context-param>
...
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
...
and the following is output by the renderer:

Code: Select all

<div class="boxco"><div class="contentheader"></div><img id="_id2:chartTest" width="400" height="300" src="chartcreatorrequest.jsf?ts=1171280072280&id=_id2:chartTest" /></div>
so, as far as I know, everything should work out fine - alas, it doesn't.

any ideas?

thanks a lot,

regards,
Julian

tsm80
Posts: 3
Joined: Mon Feb 12, 2007 12:59 pm
Location: Romania

Post by tsm80 » Mon Feb 12, 2007 1:06 pm

I've got exactly the same problem as thisWontHurtABit, except that I'm not using Facelets, but myFaces and Ajax4JSF.
If I remove anything related with myFaces and Ajax4JSF from web.xml the charts appear in my application, otherwise I get an empty picture (as if it can't find its path).
I've even tried to combine my web.xml with the sample application that Chart Creator comes with and if I add the myFaces and Ajax4JSF elements in the web.xml (or even only 1 of them, myFaces / Ajax4JSF) the charts don't appear anymore, only empty pictures :(

thisWontHurtABit
Posts: 4
Joined: Mon Feb 12, 2007 12:41 pm
Location: Vienna / Austria

Post by thisWontHurtABit » Mon Feb 12, 2007 2:40 pm

I totally forgot that... I also have ajax4jsf and myfaces in my classpath, and removing all the listeners and filters solved the problem, but... i really can't do without these libraries...

could it be there's a filtering problem?

tsm80
Posts: 3
Joined: Mon Feb 12, 2007 12:59 pm
Location: Romania

Post by tsm80 » Mon Feb 12, 2007 2:46 pm

yeah, the same situation in here, we can't do without myFaces or Ajax4JSF either...let's hope cagataycivici (the author of the library) gives us a solution :D

thisWontHurtABit
Posts: 4
Joined: Mon Feb 12, 2007 12:41 pm
Location: Vienna / Austria

Post by thisWontHurtABit » Mon Feb 12, 2007 2:59 pm

on second thought, could it also be that - the ChartCreator now being implemented as a PhaseListener - the two PhaseListeners (ChartCreator and Ajax4JSF) interfere?

hmm...

tsm80
Posts: 3
Joined: Mon Feb 12, 2007 12:59 pm
Location: Romania

Post by tsm80 » Mon Feb 12, 2007 3:19 pm

it's possible, i'm not sure. anyway even if you take out the Ajax4JSF part, it still doesn't work until you remove from web.xml myFaces, too...

thisWontHurtABit
Posts: 4
Joined: Mon Feb 12, 2007 12:41 pm
Location: Vienna / Austria

Post by thisWontHurtABit » Mon Feb 12, 2007 3:26 pm

true! well, let's hope cagatay has a solution...

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

Post by cagatay_civici » Tue Feb 13, 2007 11:06 pm

Hi everybody,

Sorry I was away for some time and could not have the chance to improve the component.

Now I'm back and will start working on these issues, hopefully an RC2 release will follow.

Regards,

news918
Posts: 4
Joined: Tue Apr 12, 2005 3:05 pm

Chart Creator in portlet

Post by news918 » Mon Apr 02, 2007 7:33 pm

I am trying to use Chart Creator in a portlet on Liferay 4.2.1. Everything looks ok but at the end I get no exceptions and the chart doesn't appear.

It seems that the PhaseListener is never invoked !!.

Any sugestions ?.

Best Regards.
N

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

Release of 1.2.0

Post by cagatay_civici » Sun May 06, 2007 9:35 am

Hi,

Just want to update that the new version with many new features and fixes is scheduled to be released on 11th of may:)

Cagatay

Locked