public class BubbleRenderer<FormatterType extends BubbleFormatter> extends XYSeriesRenderer<BubbleSeries,FormatterType>
XYPlot
as bubbles; the x/y values define the position
of the bubble and z is uses as a scaling value for the bubble's radius.Modifier and Type | Class and Description |
---|---|
static class |
BubbleRenderer.BubbleScaleMode |
Modifier and Type | Field and Description |
---|---|
protected static float |
MAX_BUBBLE_RADIUS_DEFAULT_DP |
protected static float |
MIN_BUBBLE_RADIUS_DEFAULT_DP |
Constructor and Description |
---|
BubbleRenderer(XYPlot plot) |
Modifier and Type | Method and Description |
---|---|
protected Region |
calculateBounds() |
protected void |
doDrawLegendIcon(android.graphics.Canvas canvas,
android.graphics.RectF rect,
FormatterType formatter)
Draw the legend icon in the rect passed in.
|
protected void |
drawBubble(android.graphics.Canvas canvas,
FormatterType formatter,
BubbleSeries series,
int index,
android.graphics.PointF centerPoint,
float radius)
Render a bubble onto the canvas
|
BubbleRenderer.BubbleScaleMode |
getBubbleScaleMode() |
float |
getMaxBubbleRadius() |
float |
getMinBubbleRadius() |
protected void |
onRender(android.graphics.Canvas canvas,
android.graphics.RectF plotArea,
BubbleSeries series,
FormatterType formatter,
RenderStack stack) |
void |
setBubbleScaleMode(BubbleRenderer.BubbleScaleMode bubbleScaleMode) |
void |
setMaxBubbleRadius(float maxBubbleRadius) |
void |
setMinBubbleRadius(float minBubbleRadius) |
getUniqueRegionFormatters
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesAndFormatterList, getSeriesList, render, setPlot
protected static final float MIN_BUBBLE_RADIUS_DEFAULT_DP
protected static final float MAX_BUBBLE_RADIUS_DEFAULT_DP
public BubbleRenderer(XYPlot plot)
protected void onRender(android.graphics.Canvas canvas, android.graphics.RectF plotArea, BubbleSeries series, FormatterType formatter, RenderStack stack) throws PlotRenderException
onRender
in class SeriesRenderer<XYPlot,BubbleSeries,FormatterType extends BubbleFormatter>
series
- The series to be renderedformatter
- 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
protected void drawBubble(android.graphics.Canvas canvas, FormatterType formatter, BubbleSeries series, int index, android.graphics.PointF centerPoint, float radius)
canvas
- formatter
- series
- index
- centerPoint
- the x/y coords of the center of the bubbleradius
- size of the bubbleprotected void doDrawLegendIcon(android.graphics.Canvas canvas, android.graphics.RectF rect, FormatterType formatter)
SeriesRenderer
doDrawLegendIcon
in class SeriesRenderer<XYPlot,BubbleSeries,FormatterType extends BubbleFormatter>
public float getMinBubbleRadius()
public void setMinBubbleRadius(float minBubbleRadius)
public float getMaxBubbleRadius()
public void setMaxBubbleRadius(float maxBubbleRadius)
public BubbleRenderer.BubbleScaleMode getBubbleScaleMode()
public void setBubbleScaleMode(BubbleRenderer.BubbleScaleMode bubbleScaleMode)
protected Region calculateBounds()