jfig.utils
Class MakePieChart
java.lang.Object
jfig.utils.MakePieChart
- public class MakePieChart
- extends java.lang.Object
Method Summary |
static void |
main(java.lang.String[] argv)
|
FigCompound |
makePieChart(double[] ratios)
|
FigObject |
makePieSlice(java.awt.Point center,
double radius,
double ratio,
double angle,
java.awt.Color color)
construct a slice of an pie chart with the following parameters:
radius - the pie radius in jfig units (2400dpi)
ratio - the size of this slice, as a fraction of the total 0 .. |
static double[] |
normalize(double[] data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_2PI
static final double _2PI
- See Also:
- Constant Field Values
editor
ModularEditor editor
MakePieChart
public MakePieChart()
makePieSlice
public FigObject makePieSlice(java.awt.Point center,
double radius,
double ratio,
double angle,
java.awt.Color color)
- construct a slice of an pie chart with the following parameters:
radius - the pie radius in jfig units (2400dpi)
ratio - the size of this slice, as a fraction of the total 0 .. 1.0
angle - the start angle of this slice
Note that you can always set the color, attributes, angle etc.
afterwards by calling standard jfig functions on the FigXXX objects.
This method creates FigPolylines to approximate the pie segments
(instead of FigArc) to demonstrate setPoints() etc.
makePieChart
public FigCompound makePieChart(double[] ratios)
normalize
public static double[] normalize(double[] data)
main
public static void main(java.lang.String[] argv)