How can I create a Pie charts ?

HI all,

I'm a beginner in java and i'm investigate in a web project (website) which should display statistical charts. I did a beans to generate basic bar charts, but it is most difficult to build a Pie chart. That's why i need help to put me on the rigth way to build Pie Charts beans (this pie charts should be filled up with db query).

Every kind of help will be appreciated.

Thanks in advance

Hope someone can help me.

STF

[473 byte] By [LearningSTF] at [2007-9-26 1:49:19]
# 1
Do you need to display the pie chart in a web page or will a Java application or Applet do?
KPSeal at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

I take it you constructed the bar graphs using html and images together?

Obviously it's a little more difficult to make a pie chart with html. Chances are that it will have to be an image rendered by a Servlet or JSP. I suggest looking at how to create images using AWT or swing. This will allow you to create a circle with different color slices and what not. Then you need a Servlet or JSP that will send the image out the output stream. You can then place an image tag in your html page like this <img src="http://myserver.com/PieChartServlet>

I'm actually working on an API myself that will render pretty histograms (line graphs), and hopefully pie charts down the road. It's going to be an open source project. I decided to make my own API when I looked at some others out there who were charging an arm and a leg for theirs. Chart Builder for example, it's like $6K for their java based API <choke>.

So if you're interested, or anyone else is, shoot me an email and I'll let you know when the beta is ready. Derek.Wichmann@oracle.com

-Derek">

beattris at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I would best recommend to display them as applets (within html pages). Also you could use some free third party class files for generating graphs and modify themto display the pie chart.Arnold
arnoldfire at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Hi LearningSTF,

I hope these links will help you out.

1) http://www.objectplanet.com/EasyCharts/

2)http://www.quadbase.com/espresschart/screenshot.html#colordialog

Regards,

TirumalaRao,

Developer Technical Support,

Sun Microsystems,India.

rao_indts at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Hi rao_indts :I have seen the webpage from your suggestion.It's very helpful to me ! I just want to say "I'mgrateful to you ! "Best Regards
selina_c at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Maybe you should try Cewolf which is a chart tag library based on JFreeChart to generate all kinds of charts in a JSP. See http://cewolf.sourceforge.net.Regards,Guido
laures at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
See RChart: http://www.java4less.com/charts_e.htm
rreport at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
jfreechart or jgraph could help you.See the link for more: http://www.kidslovepc.com/graphic-design/graphic-design-softwares.php
hare2 at 2007-6-29 2:55:00 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...