public class BarRenderer<FormatterType extends BarFormatter> extends GroupRenderer<FormatterType>
Modifier and Type | Class and Description |
---|---|
class |
BarRenderer.Bar |
class |
BarRenderer.BarComparator |
static class |
BarRenderer.BarWidthMode
Mode with which to calculate the width of each bar.
|
static class |
BarRenderer.Style
How bars should be laid out when in a group of 2 or more series.
|
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.
|
BarRenderer.BarWidthMode |
getBarWidthMode() |
FormatterType |
getFormatter(int index,
XYSeries series)
Retrieves the BarFormatter instance that corresponds with the series passed in.
|
BarRenderer.Style |
getStyle() |
void |
onRender(android.graphics.Canvas canvas,
android.graphics.RectF plotArea,
List<SeriesBundle<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 |
setBarWidth(BarRenderer.BarWidthMode mode,
float value) |
void |
setBarWidth(float barWidth)
Sets the width of the bars when using the FIXED_WIDTH render style
|
void |
setBarWidthMode(BarRenderer.BarWidthMode widthStyle) |
void |
setStyle(BarRenderer.Style renderStyle) |
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 setStyle(BarRenderer.Style renderStyle)
public BarRenderer.Style getStyle()
public void setBarWidthMode(BarRenderer.BarWidthMode widthStyle)
public BarRenderer.BarWidthMode getBarWidthMode()
public void setBarWidth(BarRenderer.BarWidthMode mode, 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<SeriesBundle<XYSeries,? extends FormatterType>> sfList, int seriesSize, RenderStack stack)
onRender
in class GroupRenderer<FormatterType extends BarFormatter>