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
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
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
Joined: Jan 04, 2001
Hi Tom, what is this sas? is this a tool or package, from where it can be downloaded? thanks Bansal
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.