JSF and JFreeChart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
dand
Posts: 3
Joined: Thu Nov 27, 2008 4:58 pm

JSF and JFreeChart

Post by dand » Fri Nov 28, 2008 4:20 am

I'm new to the forum so pardon me if the question has been asked (if it had been answered please point me to the right thread).

Our web application uses JSF. The application needs to display few graphs which data come from database. We checked and JFreeChart is the library that we'll use. We also see that there's ChartCreator which provides jsf tags for application of this type.

We prototyped of what we want to do with both JFreeChart and ChartCreator. Here're our challenges:
- ChartCreator (works, we were able to display a simple graph on our page) is nice however it's too limited for what we are doing.
- We are able to create charts with just JFreeChart, however we are unable to embed them in our web pages with ease. For example
We create the jpg using: ChartUtilities.saveChartAsJPEG(new File("C:\\chart.jpg"), pieChart, 500, 300);
Then point to it with <img=...
Perhaps we're using it wrong. Are there any better way of doing this?

We saw few examples that use Servlet (Chapter 19 of JFreeChart Developer Guide version 1.0.4) however we have many type of graphs, making Servlet for each graph type would be too much we think.

Thanks

Locked