Class RangeBarChart

Direct Known Subclasses:
RangeStackedBarChart

public class RangeBarChart extends BarChart

Extends BarChart to support values that represent ranges rather than single points. Each bar is drawn from the lower value to the upper value in the dataset.

Use this chart with an XYMultipleSeriesDataset containing XYSeries instances where consecutive entries form the minimum/maximum pair for a category.

  • Field Details

  • Constructor Details

  • Method Details

    • drawSeries

      public void drawSeries(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex)

      The graphical representation of a series.

      Parameters
      • canvas: the canvas to paint to

      • paint: the paint to be used for drawing

      • points: the array of points to be used for drawing the series

      • seriesRenderer: the series renderer

      • yAxisValue: the minimum value of the y axis

      • seriesIndex: the index of the series currently being drawn

      • startIndex: the start index of the rendering points

      Overrides:
      drawSeries in class BarChart
    • drawChartValuesText

      protected void drawChartValuesText(Canvas canvas, XYSeries series, XYSeriesRenderer renderer, Paint paint, List<Float> points, int seriesIndex, int startIndex)

      The graphical representation of the series values as text.

      Parameters
      • canvas: the canvas to paint to

      • series: the series to be painted

      • renderer: the series renderer

      • paint: the paint to be used for drawing

      • points: the array of points to be used for drawing the series

      • seriesIndex: the index of the series currently being drawn

      • startIndex: the start index of the rendering points

      Overrides:
      drawChartValuesText in class BarChart
    • getCoeficient

      protected float getCoeficient()

      Returns the value of a constant used to calculate the half-distance.

      Returns

      the constant value

      Overrides:
      getCoeficient in class BarChart
    • getChartType

      public String getChartType()

      Returns the chart type identifier.

      Returns

      the chart type

      Overrides:
      getChartType in class BarChart