Class GroupedStackedBarRenderer

All Implemented Interfaces:
Serializable, Cloneable, CategoryItemRenderer, org.jfree.util.PublicCloneable

public class GroupedStackedBarRenderer
extends StackedBarRenderer
A renderer that draws stacked bars within groups. This will probably be merged with the StackedBarRenderer class at some point.
See Also:
Serialized Form
  • Constructor Details

    • GroupedStackedBarRenderer

      public GroupedStackedBarRenderer()
      Creates a new renderer.
  • Method Details

    • setSeriesToGroupMap

      public void setSeriesToGroupMap​(KeyToGroupMap map)
      Updates the map used to assign each series to a group.
      Parameters:
      map - the map (null not permitted).
    • getRangeExtent

      public Range getRangeExtent​(CategoryDataset dataset)
      Returns the range of values the renderer requires to display all the items from the specified dataset.
      Specified by:
      getRangeExtent in interface CategoryItemRenderer
      Overrides:
      getRangeExtent in class StackedBarRenderer
      Parameters:
      dataset - the dataset (null permitted).
      Returns:
      The range (or null if the dataset is null or empty).
    • drawItem

      public void drawItem​(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column)
      Draws a stacked bar for a specific item.
      Specified by:
      drawItem in interface CategoryItemRenderer
      Overrides:
      drawItem in class StackedBarRenderer
      Parameters:
      g2 - the graphics device.
      state - the renderer state.
      dataArea - the plot area.
      plot - the plot.
      domainAxis - the domain (category) axis.
      rangeAxis - the range (value) axis.
      dataset - the data.
      row - the row index (zero-based).
      column - the column index (zero-based).