com.orsoncharts.renderer.category

## Class StackedBarRenderer3D

- java.lang.Object
- - com.orsoncharts.renderer.AbstractRenderer3D
  - - com.orsoncharts.renderer.category.AbstractCategoryRenderer3D
    - - com.orsoncharts.renderer.category.BarRenderer3D
      - - com.orsoncharts.renderer.category.StackedBarRenderer3D

- All Implemented Interfaces:
    ChartElement, CategoryRenderer3D, Renderer3D, java.io.Serializable

      public class StackedBarRenderer3D
      extends BarRenderer3D

  A renderer that can be used with the `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:
  (refer to `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:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface com.orsoncharts.renderer.Renderer3D

      `TRANSPARENT_COLOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StackedBarRenderer3D()` Creates a default constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `protected void` | `drawItemLabels(World world, CategoryDataset3D dataset, KeyedValues3DItemKey itemKey, double xw, double yw, double zw, double basew, boolean inverted)`
    `boolean` | `equals(java.lang.Object obj)` Tests this renderer for equality with an arbitrary object.
    `Range` | `findValueRange(Values3D<? extends java.lang.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 com.orsoncharts.renderer.category.BarRenderer3D

      `composeItem, getBarXWidth, getBarZWidth, getBase, getBaseColorSource, getTopColorSource, setBarXWidth, setBarZWidth, setBase, setBaseColorSource, setTopColorSource`

    - ### Methods inherited from class com.orsoncharts.renderer.category.AbstractCategoryRenderer3D

      `getColorSource, getItemLabelGenerator, getItemLabelOffsets, getPlot, setColors, setColorSource, setItemLabelGenerator, setItemLabelOffsets, setPlot`

    - ### Methods inherited from class com.orsoncharts.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 com.orsoncharts.renderer.Renderer3D

      `addChangeListener, removeChangeListener`

    - ### Methods inherited from interface com.orsoncharts.ChartElement

      `receive`

- - ### Constructor Detail

    - #### StackedBarRenderer3D

          public StackedBarRenderer3D()

      Creates a default constructor.

  - ### Method Detail

    - #### findValueRange

          public Range findValueRange(Values3D<? extends java.lang.Number> data)

      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 interface `CategoryRenderer3D`
      Overrides:
        `findValueRange` in class `BarRenderer3D`
      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 the `CategoryPlot3D` class while iterating over the items in the dataset.
      Specified by:
        `composeItem` in interface `CategoryRenderer3D`
      Overrides:
        `composeItem` in class `BarRenderer3D`
      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)

      Overrides:
        `drawItemLabels` in class `BarRenderer3D`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Tests this renderer for equality with an arbitrary object.
      Overrides:
        `equals` in class `BarRenderer3D`
      Parameters:
        `obj` - the object (`null` permitted).
      Returns:
        A boolean.