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 TypeMethodDescriptionvoid
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.protected void
drawItemLabels
(World world, CategoryDataset3D dataset, KeyedValues3DItemKey itemKey, double xw, double yw, double zw, double basew, boolean inverted) Draws the item labels.boolean
Tests 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, setTopColorSource
Methods inherited from class org.jfree.chart3d.renderer.category.AbstractCategoryRenderer3D
getColorSource, getItemLabelGenerator, getItemLabelOffsets, getPlot, setColors, setColorSource, setItemLabelGenerator, setItemLabelOffsets, setPlot
Methods inherited from class org.jfree.chart3d.renderer.AbstractRenderer3D
addChangeListener, fireChangeEvent, getItemLabelBackgroundColor, getItemLabelColor, getItemLabelFont, getItemLabelPositioning, isNotify, notifyListeners, receive, removeChangeListener, setItemLabelBackgroundColor, setItemLabelColor, setItemLabelFont, setItemLabelPositioning, setNotify
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jfree.chart3d.ChartElement
receive
Methods 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:
findValueRange
in interfaceCategoryRenderer3D
- Overrides:
findValueRange
in classBarRenderer3D
- Parameters:
data
- the data (null
not 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 theCategoryPlot3D
class while iterating over the items in the dataset.- Specified by:
composeItem
in interfaceCategoryRenderer3D
- Overrides:
composeItem
in classBarRenderer3D
- Parameters:
dataset
- the dataset (null
not permitted).series
- the series index.row
- the row index.column
- the column index.world
- the world (null
not permitted).dimensions
- the plot dimensions (null
not 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:
drawItemLabels
in 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:
equals
in classBarRenderer3D
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-