Solved

Create Charts + No Applet Usage

Posted on 2004-08-26
12
294 Views
Last Modified: 2010-04-01
Hi!

I want to create a Pie-chart in a JSP page without the usage of Applet. I have already created one with Applet, but somtimes its slow, is there a way to do the same directly on JSP page and export the chart as an Image.

I remember like reading something to create a buffer and then encode that with a JPEG/GIF Encoder and display it.

Are there any freeware libraries or tutorials which will help me do the same.
0
Comment
Question by:vks_vicky
  • 4
  • 4
  • 2
  • +1
12 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 125 total points
ID: 11901391
JFreeChart is your best bet:

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

There is a JSP tag library that uses JFreeChart here:

http://cewolf.sourceforge.net/

So you can easily implement your chart into JSPs
0
 
LVL 5

Author Comment

by:vks_vicky
ID: 11909799
TimYates, tnx 4 the links, but i've already tried them and having a second thought on those I posted here 2 c if i can get something better!!
0
 
LVL 6

Expert Comment

by:CodingExperts
ID: 11910967
Hi vks_vicky,
May be you can think of svg as an option .. It is very powerful .
Graphs for All kinds of statistical data, such as medical statistics or stock quotes, can be gathered to dynamically create high quality SVG graphs.

for more details you can see..
http://wwws.sun.com/software/xml/developers/svg/jsp/
http://wwws.sun.com/software/xml/developers/svg/
http://www.w3.org/Graphics/SVG/

You may need a Adobe SVG plugin to view the graph... but there are ways in which you can convert your SVG to PNG or BMP format.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11911087
> You may need a Adobe SVG plugin to view the graph...

Can you get that for Linux and Mac, or just Windows?
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11911090
> TimYates, tnx 4 the links, but i've already tried them and having a second thought on those I posted here 2 c if i can get something better!!

AFAIK, they are the best ones you can get...

Unless you want to do all the drawing yourself...but unless you want a graph that they don't do, that seems a bit like overkill :-(
0
 
LVL 6

Expert Comment

by:CodingExperts
ID: 11911964
Hi TimYates
>Can you get that for Linux and Mac, or just Windows?
Yes of course
http://www.w3.org/Graphics/SVG/SVG-Implementations
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Expert Comment

by:rrz
ID: 11913341
>with Applet, but somtimes its slow,
What part is slow ?  Is it the java plug-in ?    
>is there a way to do the same directly on JSP page and export the chart as an Image.          
Yes, put your chart code in a servlet and call that servlet with a <img> tag on your JSP.           rrz
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11913411
and if you upgrade to the 1.5 JVM the startup time is greatly reduced :-)

But it is in beta at the moment...  so not 100% production ready :-)
0
 
LVL 5

Author Comment

by:vks_vicky
ID: 11919386
Will check the links, but in the meantime i also found another set of interesting libraries from Sun 'JIMI'

Homepage...
http://java.sun.com/products/jimi/

0
 
LVL 6

Expert Comment

by:CodingExperts
ID: 11920752
Buddy you can go thru an SVG Chart plugin which wud suit ur needs. This uses the Apache Batik Project and is pretty easy to use and lot much detailed.

http://www.jspwiki.org/Wiki.jsp?page=SvgChartPlugin.
0
 
LVL 27

Expert Comment

by:rrz
ID: 11921407
>set of interesting libraries from Sun 'JIMI'
Isn't that old  ?
You should look at  
http://java.sun.com/j2se/1.4.2/docs/guide/imageio/index.html 
and use  
ImageIO.write(bi,"jpeg",out);  
where bi is the BufferedImage you created and out is a ServletOutputStream.
0
 
LVL 6

Expert Comment

by:CodingExperts
ID: 11961445
You may look into this page for additional usages....
http://jcckit.sourceforge.net/
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now