File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Creating a Pie Chart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Creating a Pie Chart" Watch "Creating a Pie Chart" New topic

Creating a Pie Chart


Joined: Sep 20, 2001
Posts: 1
I have a program that needs to draw a Pie chart based on the selection made for diferrent Check boxes. The slices depict the values of the selections in the Check Box.
Any idea how this can be JAVA......
Thanks in advance...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

1. Write it yourself using the AWT graphics code.
2. Buy one of the commercially-available java graphing packages.

An IDE is no substitute for an Intelligent Developer.
Paul Bailey
Ranch Hand

Joined: Oct 20, 2000
Posts: 91
check out the second post at

[This message has been edited by Paul Bailey (edited September 21, 2001).]

Joined: Sep 02, 2001
Posts: 6
Originally posted by Paul Bailey:
check out the second post at
[This message has been edited by Paul Bailey (edited September 21, 2001).]

How do you conver this applet so that it retrieves sales data as parameters and display the data on a pie chart.
The format of the parameters is the following:
<param name=categories value="cat1..... catn ">
<param name=cat1 value="amount1 ">
<param name=catn value="amountn ">
The amount for each category is represented as an integer. For example, the following are sample sales data for a software superstore.
<param name=categories value="education utility entertainment reference"
<param name=education value=10000>
<param name=utility value=12000>
<param name=entertainment value=30000>
<param name=reference value=9000>
I should add methods to my pie chart
applet so that it meets the Canonical Form of Public Classes.
subject: Creating a Pie Chart
jQuery in Action, 3rd edition