public class BarRenderer<FormatterType extends BarFormatter> extends XYSeriesRenderer<FormatterType>
Modifier and Type | Class and Description |
---|---|
class |
BarRenderer.Bar |
class |
BarRenderer.BarComparator |
static class |
BarRenderer.BarRenderStyle |
static class |
BarRenderer.BarWidthStyle |
Constructor and Description |
---|
BarRenderer(XYPlot plot) |
Modifier and Type | Method and Description |
---|---|
void |
doDrawLegendIcon(android.graphics.Canvas canvas,
android.graphics.RectF rect,
BarFormatter formatter)
Draw the legend icon in the rect passed in.
|
FormatterType |
getFormatter(int index,
XYSeries series)
Retrieves the BarFormatter instance that corresponds with the series passed in.
|
void |
onRender(android.graphics.Canvas canvas,
android.graphics.RectF plotArea,
XYSeries series,
FormatterType barFormatter,
RenderStack stack) |
void |
setBarComparator(Comparator<BarRenderer.Bar> barComparator)
Sets a
Comparator used for sorting bars. |
void |
setBarGap(float barGap)
Sets the size of the gap between the bar (or bar groups) when using the VARIABLE_WIDTH render style
|
void |
setBarRenderStyle(BarRenderer.BarRenderStyle renderStyle) |
void |
setBarWidth(float barWidth)
Sets the width of the bars when using the FIXED_WIDTH render style
|
void |
setBarWidthStyle(BarRenderer.BarWidthStyle widthStyle) |
void |
setBarWidthStyle(BarRenderer.BarWidthStyle style,
float value) |
getUniqueRegionFormatters
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesList, render, setPlot
public BarRenderer(XYPlot plot)
public void setBarWidth(float barWidth)
barWidth
- public void setBarGap(float barGap)
barGap
- public void setBarRenderStyle(BarRenderer.BarRenderStyle renderStyle)
public void setBarWidthStyle(BarRenderer.BarWidthStyle widthStyle)
public void setBarWidthStyle(BarRenderer.BarWidthStyle style, float value)
public void setBarComparator(Comparator<BarRenderer.Bar> barComparator)
Comparator
used for sorting bars.public void doDrawLegendIcon(android.graphics.Canvas canvas, android.graphics.RectF rect, BarFormatter formatter)
SeriesRenderer
doDrawLegendIcon
in class SeriesRenderer<XYPlot,XYSeries,FormatterType extends BarFormatter>
public FormatterType getFormatter(int index, XYSeries series)
index
- index of the point being rendered.series
- XYSeries to which the point being rendered belongs.public void onRender(android.graphics.Canvas canvas, android.graphics.RectF plotArea, XYSeries series, FormatterType barFormatter, RenderStack stack) throws PlotRenderException
onRender
in class SeriesRenderer<XYPlot,XYSeries,FormatterType extends BarFormatter>
series
- The series to be renderedbarFormatter
- The getFormatter that should be used to render the seriesstack
- Ordered list of all series being renderered. May be manipulated by the Renderer
to gain effect.PlotRenderException