com.odesys.chart.image
Class BarChartImage

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

public class BarChartImage
extends ChartImage

BarChartImage creates a Bar Chart image in JPEG format and writes its data into an OutputStream.


Constructor Summary
BarChartImage()
          Creates new BarChartImage instance
 
Method Summary
protected  Chart createChart()
          Factory method that creates the Chart instance for this BarChartImage.
 Axis getCategoriesAxis()
          Gets the axis of the Categories.
 Axis getValuesAxis()
          Gets the axis of the Values.
 void setAxisXPosition(int pos)
          Sets the position of the X axis.
 void setAxisYPosition(int pos)
          Sets the position of the Y axis.
 void setBarGap(float gap)
          Sets the gap between the Bars.
 void setCategoryGap(float gap)
          Sets the gap between the Categories.
 void setMode(int mode)
          Sets the mode of this BarChartImage.
 void setOrientation(int orientation)
          Sets the orientation of the bar chart in this BarChartImage.
 void setSeriesReversed(boolean reversed)
          Determines the order in which the Bars for the differen Series show up within the Category.
 void setZVector(float x, float y)
          Sets the depth vector.
 
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

BarChartImage

public BarChartImage()
Creates new BarChartImage instance
Method Detail

createChart

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

setMode

public void setMode(int mode)
Sets the mode of this BarChartImage. The possible modes are BarChartView.NORMAL and BarChartView.STACKED.
Parameters:
mode - The mode of this BarChartImage.

setOrientation

public void setOrientation(int orientation)
Sets the orientation of the bar chart in this BarChartImage.
Parameters:
orientation - The orientation of the bar chart in this BarChartImage (BarChartView.HORIZONTAL or BarChartView.VERTICAL).

setBarGap

public void setBarGap(float gap)
Sets the gap between the Bars.
Parameters:
gap - The gap between the Bars.

setCategoryGap

public void setCategoryGap(float gap)
Sets the gap between the Categories.
Parameters:
gap - The gap between the Categories.

setSeriesReversed

public void setSeriesReversed(boolean reversed)
Determines the order in which the Bars for the differen Series show up within the Category.
Parameters:
reversed - The order of the bars within the Category.

setZVector

public void setZVector(float x,
                       float y)
Sets the depth vector.
Parameters:
x - the x component of the depth vector.
y - the y component of the depth vector.

getValuesAxis

public Axis getValuesAxis()
Gets the axis of the Values.
Returns:
The axis of the Values.

getCategoriesAxis

public Axis getCategoriesAxis()
Gets the axis of the Categories.
Returns:
The axis of the Categories.

setAxisXPosition

public void setAxisXPosition(int pos)
Sets the position of the X axis. The allowed values are Grid.TOP and Grid.BOTTOM.
Parameters:
pos - The position of the X axis.

setAxisYPosition

public void setAxisYPosition(int pos)
Sets the position of the Y axis. The allowed values are Grid.LEFT and Grid.RIGHT.
Parameters:
pos - The position of the Y axis.