class CandlestickRenderer extends GroupRenderer<FormatterType> {

    @Override
    public void onRender(Canvas canvas, RectF plotArea, List<SeriesBundle<XYSeries,
                ? extends FormatterType>> sfList, int seriesSize,  RenderStack stack) {

        final FormatterType formatter = sfList.get(0).getFormatter();
        for(int i = 0; i < seriesSize; i++) {

            final XYSeries highSeries = sfList.get(HIGH_INDEX).getSeries();
            final XYSeries lowSeries = sfList.get(LOW_INDEX).getSeries();
            final XYSeries openSeries = sfList.get(OPEN_INDEX).getSeries();
            final XYSeries closeSeries = sfList.get(CLOSE_INDEX).getSeries();

            // x-val for all series should be identical so just grab x from the first series:
            Number x = highSeries.getX(i);

            Number high = highSeries.getY(i);
            Number low = lowSeries.getY(i);
            Number open = openSeries.getY(i);
            Number close = closeSeries.getY(i);

            // draw the candlestick:
            final PointF highPix = getPlot().getBounds().transformScreen(x, high, plotArea);
            final PointF lowPix = getPlot().getBounds().transformScreen(x, low, plotArea);
            final PointF openPix = getPlot().getBounds().transformScreen(x, open, plotArea);
            final PointF closePix = getPlot().getBounds().transformScreen(x, close, plotArea);

            drawWick(canvas, highPix, lowPix, formatter);
            drawBody(canvas, openPix, closePix, formatter);
            drawUpperCap(canvas, highPix, formatter);
            drawLowerCap(canvas, lowPix, formatter);

            // draw labels, if any:
            final PointLabelFormatter plf = formatter.hasPointLabelFormatter()
                                            ? formatter.getPointLabelFormatter() : null;
            final PointLabeler pointLabeler = formatter.getPointLabeler();
            if(plf != null && pointLabeler != null) {
                drawTextLabel(canvas, highPix, pointLabeler.getLabel(highSeries, i), plf);
                drawTextLabel(canvas, lowPix, pointLabeler.getLabel(lowSeries, i), plf);
                drawTextLabel(canvas, openPix, pointLabeler.getLabel(openSeries, i), plf);
                drawTextLabel(canvas, closePix, pointLabeler.getLabel(closeSeries, i), plf);
            }
        }
    }

    public  CandlestickRenderer(XYPlot plot);

}