public class CandlestickRenderer<FormatterType extends CandlestickFormatter> extends GroupRenderer<FormatterType>
XYSeries
as a candlestick chart
into an XYPlot
.
Constraints:
- Exactly four series must be added using the same CandlestickFormatter
.
- Each of the four series has the same x(i) value.
- Expects that series are added in the order of:
high, low, open, close
CandlestickSeries
and CandlestickMaker
provide simplified classes and methods
for setting up a candlestick chart.Modifier and Type | Field and Description |
---|---|
protected static int |
CLOSE_INDEX |
protected static int |
HIGH_INDEX |
protected static int |
LOW_INDEX |
protected static int |
OPEN_INDEX |
Constructor and Description |
---|
CandlestickRenderer(XYPlot plot) |
Modifier and Type | Method and Description |
---|---|
protected void |
doDrawLegendIcon(android.graphics.Canvas canvas,
android.graphics.RectF rect,
FormatterType formatter)
Draw the legend icon in the rect passed in.
|
protected void |
drawBody(android.graphics.Canvas canvas,
android.graphics.PointF open,
android.graphics.PointF close,
FormatterType formatter) |
protected void |
drawLowerCap(android.graphics.Canvas canvas,
android.graphics.PointF val,
FormatterType formatter) |
protected void |
drawTextLabel(android.graphics.Canvas canvas,
android.graphics.PointF coords,
java.lang.String text,
PointLabelFormatter plf) |
protected void |
drawTriangle(android.graphics.Canvas canvas,
android.graphics.RectF rect,
android.graphics.Paint fillPaint,
android.graphics.Paint strokePaint) |
protected void |
drawUpperCap(android.graphics.Canvas canvas,
android.graphics.PointF val,
FormatterType formatter) |
protected void |
drawWick(android.graphics.Canvas canvas,
android.graphics.PointF min,
android.graphics.PointF max,
FormatterType formatter) |
void |
onRender(android.graphics.Canvas canvas,
android.graphics.RectF plotArea,
java.util.List<SeriesBundle<XYSeries,? extends FormatterType>> sfList,
int seriesSize,
RenderStack stack) |
onRender
getUniqueRegionFormatters
drawSeriesLegendIcon, getFormatter, getPlot, getSeriesAndFormatterList, getSeriesList, render, setPlot
protected static final int HIGH_INDEX
protected static final int LOW_INDEX
protected static final int OPEN_INDEX
protected static final int CLOSE_INDEX
public CandlestickRenderer(XYPlot plot)
public void onRender(android.graphics.Canvas canvas, android.graphics.RectF plotArea, java.util.List<SeriesBundle<XYSeries,? extends FormatterType>> sfList, int seriesSize, RenderStack stack)
onRender
in class GroupRenderer<FormatterType extends CandlestickFormatter>
protected void drawTextLabel(android.graphics.Canvas canvas, android.graphics.PointF coords, java.lang.String text, PointLabelFormatter plf)
protected void drawWick(android.graphics.Canvas canvas, android.graphics.PointF min, android.graphics.PointF max, FormatterType formatter)
protected void drawBody(android.graphics.Canvas canvas, android.graphics.PointF open, android.graphics.PointF close, FormatterType formatter)
protected void drawUpperCap(android.graphics.Canvas canvas, android.graphics.PointF val, FormatterType formatter)
protected void drawLowerCap(android.graphics.Canvas canvas, android.graphics.PointF val, FormatterType formatter)
protected void doDrawLegendIcon(android.graphics.Canvas canvas, android.graphics.RectF rect, FormatterType formatter)
SeriesRenderer
doDrawLegendIcon
in class SeriesRenderer<XYPlot,XYSeries,FormatterType extends CandlestickFormatter>
protected void drawTriangle(android.graphics.Canvas canvas, android.graphics.RectF rect, android.graphics.Paint fillPaint, android.graphics.Paint strokePaint)