public class PieChart extends Chart
PieChart
class implements drawing a pie chart from data
samples. From each data row only the first sample is taken to draw the pie.
The slices are drawn counter clock wise, last row to first starting at the
start
angle as defined with setStart(double)
.
As a side effect the the ticksample
data in the Y axis of the
graph is set to the percentage of the sum of sample values. See
draw(Graph, boolean)
for more information.chartTypes
Constructor and Description |
---|
PieChart() |
Modifier and Type | Method and Description |
---|---|
Layer |
draw(Graph graph,
boolean doDraw)
Draws the pie chart into a new layer of the defined height and width.
|
static java.lang.String |
getName() |
void |
setHeight(int height)
Sets the height of the pie chart, if it has not been set yet.
|
void |
setStart(double start)
Sets the starting angle of the first pie piece, if it has not been set
yet.
|
void |
setWidth(int width)
Sets the width of the pie chart, if it has not been set yet.
|
getInstance
public static java.lang.String getName()
public Layer draw(Graph graph, boolean doDraw)
ticksample
value of the graph's Y axis as the chart is
drawn. This method can thus be used to simply calculate this data.public void setWidth(int width)
width
- The width of the pie chart.public void setHeight(int height)
height
- The height of the pie chart.public void setStart(double start)
start
- Copyright © 2010 - 2020 Adobe. All Rights Reserved