com.odesys.chart.image
Class PieChartImage

java.lang.Object
  |
  +--com.odesys.chart.image.ChartImage
        |
        +--com.odesys.chart.image.PieChartImage

public class PieChartImage
extends ChartImage

PieChartImage creates a Pie Chart image in JPEG format and writes its data into an OutputStream.


Constructor Summary
PieChartImage()
          Creates new PieChartImage instance.
 
Method Summary
protected  Chart createChart()
          Factory method that creates the Chart instance for this PieChartImage.
 void setChartRatio(float ratio)
          Sets the ratio between the two radiuses of the chart ellipse.
 void setDirection(float direction)
          Sets the orientation of the Pie Chart in radians.
 void setExplodeRatio(float explodeRatio)
          Sets the distance between the slices and the chart when exploded.
 void setHeightRatio(float heightRatio)
          Sets the ratio between the height of the chart and the main radius of the chart's ellipse.
 void setLabelsRatio(float labelsRatio)
          Sets the distance between the labels and the chart.
 void setPrecision(float precision)
           
 
Methods inherited from class com.odesys.chart.image.ChartImage
getChart, getModel, setBackground, setChartBackground, setChartContoursVisible, setChartFont, setChartForeground, setFont, setLabelsVisible, setLegendBackground, setLegendContoursVisible, setLegendFont, setLegendForeground, setLegendVisible, setModel, setQuality, setSize, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PieChartImage

public PieChartImage()
Creates new PieChartImage instance.
Method Detail

createChart

protected Chart createChart()
Factory method that creates the Chart instance for this PieChartImage.
Overrides:
createChart in class ChartImage
Returns:
A new PieChart instance.

setPrecision

public void setPrecision(float precision)

setDirection

public void setDirection(float direction)
Sets the orientation of the Pie Chart in radians.
Parameters:
direction - The orientation of the Pie Chart in radians.

setChartRatio

public void setChartRatio(float ratio)
Sets the ratio between the two radiuses of the chart ellipse.
Parameters:
ratio - The ratio between the two radiuses of the chart ellipse [0.1 - 1.0].

setHeightRatio

public void setHeightRatio(float heightRatio)
Sets the ratio between the height of the chart and the main radius of the chart's ellipse.
Parameters:
heightRatio - The ratio between the height of the chart and the main radius of the chart's ellipse [0.0, 1.0].

setExplodeRatio

public void setExplodeRatio(float explodeRatio)
Sets the distance between the slices and the chart when exploded. The distance is specified relatively to the main radius.
Parameters:
explodeRatio - How far from the char should the slices detach [1.0 - 1.5].

setLabelsRatio

public void setLabelsRatio(float labelsRatio)
Sets the distance between the labels and the chart. The distance is specified relatively to the main radius.
Parameters:
labelsRatio - How far from the chart should the labels be [1.0 - 2.0].