Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a Graph/Chart is JSP

 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64969
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing in JSP that can help you. You'll need to find an open source or commercial charting package to use
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the problem to read an XSL file, or to create a chart from its data?
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JFree Chart to create charts and Apache POI to read XLS file.

http://poi.apache.org/

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

 
Somnath Mallick
Ranch Hand
Posts: 483
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64969
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
Hibernate Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um, 10000 data points in a single chart? How is supposed to find any particular data item of interest?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic