|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.renderer.AbstractRenderer | +--org.jfree.chart.renderer.AbstractXYItemRenderer | +--org.jfree.chart.renderer.VerticalXYBarRenderer | +--org.jfree.chart.renderer.ClusteredXYBarRenderer
An extension of VerticalXYBarRenderer that displays bars for different series values at the same x next to each other. The assumption here is that for each x (time or else) there is a y value for each series. If this is not the case, there will be spaces between bars for a given x.
Field Summary |
Fields inherited from class org.jfree.chart.renderer.AbstractRenderer |
DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PAINT, DEFAULT_SHAPE, DEFAULT_STROKE |
Constructor Summary | |
ClusteredXYBarRenderer()
Default constructor. |
|
ClusteredXYBarRenderer(double margin,
boolean centerBarAtStartValue)
Constructs a new XY clustered bar renderer. |
Method Summary | |
void |
drawItem(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
XYPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
XYDataset data,
int datasetIndex,
int series,
int item,
CrosshairInfo crosshairInfo)
Draws the visual representation of a single data item. |
void |
initialise(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
XYPlot plot,
XYDataset data,
ChartRenderingInfo info)
Initialises the renderer. |
void |
setMargin(double margin)
Sets the margin. |
Methods inherited from class org.jfree.chart.renderer.AbstractXYItemRenderer |
drawDomainGridLine, drawDomainMarker, drawRangeGridLine, drawRangeMarker, equals, getLegendItem, getToolTipGenerator, getURLGenerator, setToolTipGenerator, setURLGenerator |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.renderer.XYItemRenderer |
addPropertyChangeListener, drawDomainGridLine, drawDomainMarker, drawRangeGridLine, drawRangeMarker, getItemOutlinePaint, getItemPaint, getItemShape, getItemStroke, getLegendItem, getPlot, getSeriesOutlinePaint, getSeriesPaint, getSeriesShape, getSeriesStroke, getToolTipGenerator, getURLGenerator, removePropertyChangeListener, setDrawingSupplier, setPlot, setSeriesPaint, setSeriesPaint, setToolTipGenerator, setURLGenerator |
Constructor Detail |
public ClusteredXYBarRenderer()
public ClusteredXYBarRenderer(double margin, boolean centerBarAtStartValue)
margin
- the percentage amount to trim from the width of each bar.centerBarAtStartValue
- If true, bars will be centered on the start of the time period.Method Detail |
public void initialise(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, XYPlot plot, XYDataset data, ChartRenderingInfo info)
initialise
in interface XYItemRenderer
initialise
in class VerticalXYBarRenderer
g2
- the graphics device.dataArea
- the area inside the axes.plot
- the plot.data
- the data.info
- an optional info collection object to return data back to the caller.public void setMargin(double margin)
setMargin
in class VerticalXYBarRenderer
margin
- the margin.public void drawItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset data, int datasetIndex, int series, int item, CrosshairInfo crosshairInfo)
drawItem
in interface XYItemRenderer
drawItem
in class VerticalXYBarRenderer
g2
- the graphics device.dataArea
- the area within which the plot is being drawn.info
- collects information about the drawing.plot
- the plot (can be used to obtain standard color information etc).domainAxis
- the domain axis.rangeAxis
- the range axis.data
- the dataset.datasetIndex
- the dataset index.series
- the series index.item
- the item index.crosshairInfo
- collects information about crosshairs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |