Question:
how to create a pie chart builder using java?
Nathan
2008-03-28 03:53:51 UTC
hi there, i'm so lost..i need to create an java applet whch can build bar charts and pie charts.My problem is that i don't know what are the attributes of the interface of my applet.does any1 know how to create a chart builder using java??
Three answers:
anonymous
2008-03-28 07:00:33 UTC
just google...

java: pie chart



I like this one code I pasted the link for you. It is a simple class you can use for starting your project. If you know java at all, you can subclass this code.



I don't know at what level you want. Swing will do this. Manning Publications "Swing" (first edition) has examples and the book is available online as a MS Word doc (free).



If you assignment is covering the Java2D graphics, the Sun Java2D has tutorials drawing charts.
kainaw
2008-03-28 11:00:15 UTC
It is apparent that your object will take in at least two attributes:

1) Should it be a pie or bar chart?

2) What are the values to be shown (most likely passed as an array)?



From there, you can draw a set of rectangles based on the values or you can draw a series of filled arcs based on the values. It is very straight-forward. Nothing tricky.
Jennifer L
2008-03-28 13:05:32 UTC
That is going to be quite difficult. If you are still stuck with your project assignment may be you can contact a java expert live at website like http://askexpert.info/ .


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...