public class RangeBarChart
- Object
- AbstractChart
- XYChart
- BarChart
- RangeBarChart
Known subtypesRangeStackedBarChart
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.
Fields
public static final String TYPE = "RangeBar" | The chart type. |
Constructors
public RangeBarChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type) | Builds a new range bar chart instance. |
Methods
Inherited nested types
Inherited fields
Inherited methods
From BarChart
clickableAreasForPoints, drawBar, drawBar, getGradientPartialColor, getLegendShapeWidth, drawLegendShape, getHalfDiffX, isRenderNullValues, getDefaultMinimum
From XYChart
setDatasetRenderer, draw, getXLabels, getYLabels, getScreenR, setScreenR, drawSeries, drawPoints, drawText, drawXLabels, drawYLabels, drawXTextLabels, getRenderer, getDataset, getCalcRange, setCalcRange, toRealPoint, toScreenPoint, toRealPoint, toScreenPoint, getSeriesAndPointForScreenCoordinate, isRenderPoints, getPointsChart
Field details
TYPE
public static final String TYPE = "RangeBar"Constructor details
RangeBarChart
public RangeBarChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)Parameters
datasetXYMultipleSeriesDataset- the multiple series dataset
rendererXYMultipleSeriesRenderer- the multiple series renderer
typeBarChart.Type- the range bar chart type
Method details
drawSeries
public void drawSeries(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex)Parameters
canvasCanvas- the canvas to paint to
paintPaint- the paint to be used for drawing
pointsList<Float>- the array of points to be used for drawing the series
seriesRendererXYSeriesRenderer- the series renderer
yAxisValuefloat- the minimum value of the y axis
seriesIndexint- the index of the series currently being drawn
startIndexint- the start index of the rendering points
drawChartValuesText
protected void drawChartValuesText(Canvas canvas, XYSeries series, XYSeriesRenderer renderer, Paint paint, List<Float> points, int seriesIndex, int startIndex)Parameters
canvasCanvas- the canvas to paint to
seriesXYSeries- the series to be painted
rendererXYSeriesRenderer- the series renderer
paintPaint- the paint to be used for drawing
pointsList<Float>- the array of points to be used for drawing the series
seriesIndexint- the index of the series currently being drawn
startIndexint- the start index of the rendering points
getCoeficient
protected float getCoeficient()Returns
getChartType
public String getChartType()