java.lang.Object
org.jfree.chart3d.renderer.AbstractRenderer3D
org.jfree.chart3d.renderer.category.AbstractCategoryRenderer3D
org.jfree.chart3d.renderer.category.BarRenderer3D
org.jfree.chart3d.renderer.category.StackedBarRenderer3D
- All Implemented Interfaces:
Serializable,ChartElement,CategoryRenderer3D,Renderer3D
A renderer that can be used with the
(refer to
There is a factory method to create a chart using this renderer - see
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
CategoryPlot3D class to create
3D stacked bar charts from data in a CategoryDataset3D. The
createStackedBarChart() method in the Chart3DFactory
class will construct a chart that uses this renderer. Here is a sample:
StackedBarChart3DDemo1.java for the code to generate
the above chart).
There is a factory method to create a chart using this renderer - see
Chart3DFactory.createStackedBarChart(String, String, CategoryDataset3D, String, String, String).
NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
- See Also:
-
Field Summary
Fields inherited from interface org.jfree.chart3d.renderer.Renderer3D
TRANSPARENT_COLOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomposeItem(CategoryDataset3D dataset, int series, int row, int column, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset) Constructs and places one item from the specified dataset into the given world.protected voiddrawItemLabels(World world, CategoryDataset3D dataset, KeyedValues3DItemKey itemKey, double xw, double yw, double zw, double basew, boolean inverted) Draws the item labels.booleanTests this renderer for equality with an arbitrary object.findValueRange(Values3D<? extends Number> data) Returns the range of values that will be required on the value axis to see all the data from the dataset.Methods inherited from class org.jfree.chart3d.renderer.category.BarRenderer3D
composeItem, getBarXWidth, getBarZWidth, getBase, getBaseColorSource, getTopColorSource, setBarXWidth, setBarZWidth, setBase, setBaseColorSource, setTopColorSourceMethods inherited from class org.jfree.chart3d.renderer.category.AbstractCategoryRenderer3D
getColorSource, getItemLabelGenerator, getItemLabelOffsets, getPlot, setColors, setColorSource, setItemLabelGenerator, setItemLabelOffsets, setPlotMethods inherited from class org.jfree.chart3d.renderer.AbstractRenderer3D
addChangeListener, fireChangeEvent, getItemLabelBackgroundColor, getItemLabelColor, getItemLabelFont, getItemLabelPositioning, isNotify, notifyListeners, receive, removeChangeListener, setItemLabelBackgroundColor, setItemLabelColor, setItemLabelFont, setItemLabelPositioning, setNotifyMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.chart3d.ChartElement
receiveMethods inherited from interface org.jfree.chart3d.renderer.Renderer3D
addChangeListener, removeChangeListener
-
Constructor Details
-
StackedBarRenderer3D
public StackedBarRenderer3D()Creates a default constructor.
-
-
Method Details
-
findValueRange
Returns the range of values that will be required on the value axis to see all the data from the dataset. We override the method to account for the bars from each series being stacked on top of one another.- Specified by:
findValueRangein interfaceCategoryRenderer3D- Overrides:
findValueRangein classBarRenderer3D- Parameters:
data- the data (nullnot permitted).- Returns:
- The range (possibly
null)
-
composeItem
public void composeItem(CategoryDataset3D dataset, int series, int row, int column, World world, Dimension3D dimensions, double xOffset, double yOffset, double zOffset) Constructs and places one item from the specified dataset into the given world. This method will be called by theCategoryPlot3Dclass while iterating over the items in the dataset.- Specified by:
composeItemin interfaceCategoryRenderer3D- Overrides:
composeItemin classBarRenderer3D- Parameters:
dataset- the dataset (nullnot permitted).series- the series index.row- the row index.column- the column index.world- the world (nullnot permitted).dimensions- the plot dimensions (nullnot permitted).xOffset- the x-offset.yOffset- the y-offset.zOffset- the z-offset.
-
drawItemLabels
protected void drawItemLabels(World world, CategoryDataset3D dataset, KeyedValues3DItemKey itemKey, double xw, double yw, double zw, double basew, boolean inverted) Draws the item labels.- Overrides:
drawItemLabelsin classBarRenderer3D- Parameters:
world- the world.dataset- the dataset.itemKey- the item key.xw- the x-coordinate.yw- the y-coordinate.zw- the z-coordinate.basew- the base coordinate.inverted- is the y-axis inverted?
-
equals
Tests this renderer for equality with an arbitrary object.- Overrides:
equalsin classBarRenderer3D- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-