Package com.androidplot.xy
Class BarRenderer
-
- All Implemented Interfaces:
public class BarRenderer<FormatterType extends BarFormatter> extends GroupRenderer<FormatterType>
Renders the points in an XYSeries as bars. See BarOrientation javadoc for details on supported presentation styles.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumBarRenderer.BarOrientationHow bars should be laid out when in a group of 2 or more series.
public enumBarRenderer.BarGroupWidthModeMode with which to calculate the width of each bar.
public classBarRenderer.Barpublic classBarRenderer.BarComparatorUsed to determine the order in which bars of the same group will be drawn.
-
Field Summary
Fields Modifier and Type Field Description public BarRenderer.BarOrientationbarOrientationpublic BarRenderer.BarGroupWidthModebarGroupWidthModepublic PlotTypeplot
-
Constructor Summary
Constructors Constructor Description BarRenderer(XYPlot plot)
-
Method Summary
Modifier and Type Method Description BarRenderer.BarOrientationgetBarOrientation()voidsetBarOrientation(@NonNull() BarRenderer.BarOrientation renderBarOrientation)BarRenderer.BarGroupWidthModegetBarGroupWidthMode()floatgetBarGroupWidth()voidsetBarGroupWidth(@NonNull() BarRenderer.BarGroupWidthMode mode, float width)voiddoDrawLegendIcon(@NonNull() Canvas canvas, @NonNull() RectF rect, @NonNull() BarFormatter formatter)Draw the legend icon in the rect passed in. FormatterTypegetFormatter(int index, @NonNull() XYSeries series)Retrieves the BarFormatter instance that corresponds with the series passed in. voidonRender(@NonNull() Canvas canvas, @NonNull() RectF plotArea, @NonNull() List<SeriesBundle<XYSeries, out FormatterType>> sfList, int seriesSize, @NonNull() RenderStack stack)-
Methods inherited from class com.androidplot.ui.SeriesRenderer
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesAndFormatterList, getSeriesList, render, setPlot -
Methods inherited from class com.androidplot.xy.XYSeriesRenderer
getUniqueRegionFormatters -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BarRenderer
BarRenderer(XYPlot plot)
-
-
Method Detail
-
getBarOrientation
@NonNull() BarRenderer.BarOrientation getBarOrientation()
-
setBarOrientation
void setBarOrientation(@NonNull() BarRenderer.BarOrientation renderBarOrientation)
-
getBarGroupWidthMode
@NonNull() BarRenderer.BarGroupWidthMode getBarGroupWidthMode()
-
getBarGroupWidth
float getBarGroupWidth()
-
setBarGroupWidth
void setBarGroupWidth(@NonNull() BarRenderer.BarGroupWidthMode mode, float width)
-
doDrawLegendIcon
void doDrawLegendIcon(@NonNull() Canvas canvas, @NonNull() RectF rect, @NonNull() BarFormatter formatter)
Draw the legend icon in the rect passed in.
-
getFormatter
@Nullable() FormatterType getFormatter(int index, @NonNull() XYSeries series)
Retrieves the BarFormatter instance that corresponds with the series passed in. Can be overridden to return other BarFormatters as a result of touch events etc.
- Parameters:
index- index of the point being rendered.series- XYSeries to which the point being rendered belongs.- Returns:
The desired getFormatter or null to use the default.
-
onRender
void onRender(@NonNull() Canvas canvas, @NonNull() RectF plotArea, @NonNull() List<SeriesBundle<XYSeries, out FormatterType>> sfList, int seriesSize, @NonNull() RenderStack stack)
-
-
-
-