Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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

Win a copy of Head First Android this week in the Android forum!
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: 16883

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

Customer surveys are for companies who didn't pay proper attention to begin with.
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.
It is sorta covered in the JavaRanch Style Guide.
subject: Creating a Pie Chart
It's not a secret anymore!