Class RangeBarChart
- Direct Known Subclasses:
RangeStackedBarChart
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class BarChart
BarChart.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRangeBarChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type) Builds a new range bar chart instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddrawChartValuesText(Canvas canvas, XYSeries series, XYSeriesRenderer renderer, Paint paint, List<Float> points, int seriesIndex, int startIndex) The graphical representation of the series values as text.voiddrawSeries(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) The graphical representation of a series.Returns the chart type identifier.protected floatReturns the value of a constant used to calculate the half-distance.Methods inherited from class BarChart
clickableAreasForPoints, drawBar, drawBar, drawLegendShape, getDefaultMinimum, getGradientPartialColor, getHalfDiffX, getLegendShapeWidth, isRenderNullValuesMethods inherited from class XYChart
draw, drawPoints, drawSeries, drawText, drawXLabels, drawXTextLabels, drawYLabels, getCalcRange, getDataset, getPointsChart, getRenderer, getScreenR, getSeriesAndPointForScreenCoordinate, getXLabels, getYLabels, isRenderPoints, setCalcRange, setDatasetRenderer, setScreenR, toRealPoint, toRealPoint, toScreenPoint, toScreenPointMethods inherited from class AbstractChart
calculateDrawPoints, drawBackground, drawLabel, drawLegend, drawPath, drawPath, drawString, getExceed, getLabel, getLegendSize, isNullValue, isVertical
-
Field Details
-
TYPE
-
-
Constructor Details
-
RangeBarChart
public RangeBarChart(XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type) Builds a new range bar chart instance.
Parameters
-
dataset: the multiple series dataset -
renderer: the multiple series renderer -
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) 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:
drawSeriesin classBarChart
-
-
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:
drawChartValuesTextin classBarChart
-
-
getCoeficient
protected float getCoeficient()Returns the value of a constant used to calculate the half-distance.
Returns
the constant value
- Overrides:
getCoeficientin classBarChart
-
getChartType
Returns the chart type identifier.
Returns
the chart type
- Overrides:
getChartTypein classBarChart
-