Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

showing graphs

 
Sunil K Bansal
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I m making a project using servlets
in one report i hv to show a graph,
based on the values in database.
how this can be done.
I hv to use java 3d or applets(simple draw line etc.)
or what
.
which will be the easiest way
Thanks
Bansal
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to show the data as a result on a web page? Yeah, Applets are a possibility, but you might find a better solution first...
If you can show the results as a sinmple column graph, you can have each as a 1x1 pixel gif and stretch to size (eg img src="red.gif" height="10" width="100") and change the width value for each. This is a VERY light solution.
You could also have a Servlet output a dynamic image of the graph you desire. This requires more work from the server, but I still prefer it over Applets and the troubles you'll inherit...
Another option is the bunch of 3rd party apps available to do the graphics for you, not that I can think of any.
Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64837
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another option is the bunch of 3rd party apps available to do the graphics for you, not that I can think of any.

One I've heard of (but have not used personally) is KavaChart.
hth,
bear
 
Sita Kodali
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to try this
Creating Dynamic images using Java Servlets
HTH
--
Venkat
 
Tom Caldwell
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked this very same question in this forum about a month ago. I had started to code my own servlet when I ran into a much easier way. If you have sas, there is a new option in version 8 that creates an applet from your data, in my case db2. Once created you can then click on the applet and change the graph type from a bar, to a pie graph, to a line graph, change colors, backgrounds, shapes, connectors, etc.
My manager needed 89 graphs in a hurry and this made it a snap to do in a very short time.
 
Sunil K Bansal
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tom,
what is this sas?
is this a tool or package,
from where it can be downloaded?
thanks
Bansal
 
Jaume Sola
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See RChart: http://www.java4less.com and click on "RChart".
It has the following advantages:
- very reasonable price (starting at $24)
- Documentation , support and online-tutorial - Works as applet, servlet or bean.
- It works with java 1.1 also
- Supports more than 18 types of charts andhas interactive features (zoom,tips,scroll,html
links)
- Includes RChart Visual Builder (almost no programming)
- Can read data from database.
- source code is available can be freely modified for commercial applications also.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic