wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Creating a Graph/Chart is JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Creating a Graph/Chart is JSP" Watch "Creating a Graph/Chart is JSP" New topic
Author

Creating a Graph/Chart is JSP

Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Hi Everyone,

I have to create a JSP/Servlet code where i have to read an excel sheet and generate a graph report and display in a JSP. Could you please let me know where to start off with this code.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

There is nothing in JSP that can help you. You'll need to find an open source or commercial charting package to use


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41601
    
  55
Is the problem to read an XSL file, or to create a chart from its data?


Ping & DNS - my free Android networking tools app
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

JFreeChart will make about any kind of chart/graph that folks need, its open source, etc.

There is a wrapper, I forget the name this second, that lets you write JSP code to access the server-side generated JFreeChart

Works well.
Prafulla N. Patil
Ranch Hand

Joined: Mar 20, 2006
Posts: 106
JFree Chart to create charts and Apache POI to read XLS file.

http://poi.apache.org/

http://www.jfree.org/jfreechart/


Thanks, Prafulla Patil
SCJP, SCWCD
Somnath Mallick
Ranch Hand

Joined: Mar 04, 2009
Posts: 477
Thanks guys! I was just going through JFreeChart! Its a bit complicated for starters. Are there any tutorials out there! The developers guide costs $40!
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

There are online tutorials. Its actually fairly easy to use, but since it is powerful, it has a zillion options, and they can get confusing. I remember it took me a day or so to understand how to approach it.

Sorry, I don't remember the link, but I'm sure there are some.

The manual is how the guy who writes it supports himself, which seems fair to me.

Pat
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Pat Farrell wrote:There is a wrapper, I forget the name this second, that lets you write JSP code to access the server-side generated JFreeChart

cewolf
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Bear Bibeault wrote:cewolf


Yep, that's it. Works well.

I have not tried it in a heavy load server environment, but for light load, its great. So for a school assignment or a demo, I'd use it in a minute. Perhaps not for the next Twitter or FaceBook implementation.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41601
    
  55
Since cewolf is sort of my project now, I'd like to point out that for the time being, the version you should be using is not the one on SourceForge, but the one you can find linked in my signature. It has numerous bug fixes and new features compared to the "official" version on SourceForge. Eventually those changes will find their way to the official distribution (for which I'm a committer), but I haven't gotten around to that yet.
Sidharth Pallai
Ranch Hand

Joined: Apr 21, 2008
Posts: 134

I have a critical scenario , where i need to display 10,000 or more IP and their corresponding reported Alarms in a JFreechart. Am in a doubt , is there any way to plot 10,000 or more IP in a chart. Is there some other approach to plot such a buly IP's just to know each IP's reported alarm. Seeking for any response/ideas


Thanks & Regards
Sidharth Pallai
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41601
    
  55
Um, 10000 data points in a single chart? How is supposed to find any particular data item of interest?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Creating a Graph/Chart is JSP