public class BarRenderer<FormatterType extends BarFormatter> extends GroupRenderer<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,
List<SeriesAndFormatter<XYSeries,? extends FormatterType>> sfList,
int seriesSize,
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) |
onRender
getUniqueRegionFormatters
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesAndFormatterList, 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, List<SeriesAndFormatter<XYSeries,? extends FormatterType>> sfList, int seriesSize, RenderStack stack)
onRender
in class GroupRenderer<FormatterType extends BarFormatter>