Class AreaRenderer3D

All Implemented Interfaces:
Serializable, ChartElement, CategoryRenderer3D, Renderer3D

A renderer for creating 3D area charts from data in a CategoryDataset3D (for use with a CategoryPlot3D). For example:
image/AreaChart3DDemo1.svg
(refer to AreaChart3DDemo1.java for the code to generate the above chart).

There is a factory method to create a chart using this renderer - see Chart3DFactory.createAreaChart(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:
  • Constructor Details

  • Method Details

    • getBase

      public double getBase()
      Returns the y-value for the base of the area. The default value is 0.0.
      Returns:
      The base value.
    • setBase

      public void setBase(double base)
      Sets the base value and sends a change event to all registered listeners.
      Parameters:
      base - the base value.
    • getBaseColor

      public Color getBaseColor()
      Returns the color used to paint the underside of the area polygons. The default value is null (which means the undersides are painted using the regular series color).
      Returns:
      The color (possibly null).
      See Also:
    • setBaseColor

      public void setBaseColor(Color color)
      Sets the color for the underside of the area shapes and sends a change event to all registered listeners. If you set this to null the base will be painted with the regular series color.
      Parameters:
      color - the color (null permitted).
    • getDepth

      public double getDepth()
      Returns the depth (in 3D) for the area (in world units). The default value is 0.6.
      Returns:
      The depth.
    • setDepth

      public void setDepth(double depth)
      Sets the depth (in 3D) and sends a change event to all registered listeners.
      Parameters:
      depth - the depth.
    • getClipColorSource

      Returns the color source used to determine the color used to highlight clipping in the chart elements. If the source is null, then the regular series color is used instead.
      Returns:
      The color source (possibly null).
      Since:
      1.3
    • setClipColorSource

      Sets the color source that determines the color used to highlight clipping in the chart elements, and sends a Renderer3DChangeEvent to all registered listeners.
      Parameters:
      source - the source (null permitted).
      Since:
      1.3
    • getDrawFaceOutlines

      public boolean getDrawFaceOutlines()
      Returns the flag that controls whether or not the faces making up area segments will be drawn with outlines. The default value is true. When anti-aliasing is on, the fill area for the faces will have some gray shades around the edges, and these will show up on the chart as thin lines (usually not visible if you turn off anti-aliasing). To mask this, the rendering engine can draw an outline around each face in the same color (this usually results in cleaner output, but it is slower and can introduce some minor visual artifacts as well depending on the output target).
      Returns:
      A boolean.
      Since:
      1.3
    • setDrawFaceOutlines

      public void setDrawFaceOutlines(boolean outline)
      Sets the flag that controls whether or not outlines are drawn for the faces making up the area segments and sends a change event to all registered listeners.
      Parameters:
      outline - the new flag value.
      Since:
      1.3
    • findValueRange

      public Range findValueRange(Values3D<? extends Number> data)
      Returns the range (for the value axis) that is required for this renderer to show all the values in the specified data set. This method is overridden to ensure that the range includes the base value (normally 0.0) set for the renderer.
      Specified by:
      findValueRange in interface CategoryRenderer3D
      Overrides:
      findValueRange in class AbstractCategoryRenderer3D
      Parameters:
      data - the data (null not permitted).
      Returns:
      The range.
    • 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
      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.
    • equals

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