use of com.github.mikephil.charting.charts.CombinedChart in project MPAndroidChart by PhilJay.
the class CombinedChartRenderer method createRenderers.
/**
* Creates the renderers needed for this combined-renderer in the required order. Also takes the DrawOrder into
* consideration.
*/
public void createRenderers() {
mRenderers.clear();
CombinedChart chart = (CombinedChart) mChart.get();
if (chart == null)
return;
DrawOrder[] orders = chart.getDrawOrder();
for (DrawOrder order : orders) {
switch(order) {
case BAR:
if (chart.getBarData() != null)
mRenderers.add(new BarChartRenderer(chart, mAnimator, mViewPortHandler));
break;
case BUBBLE:
if (chart.getBubbleData() != null)
mRenderers.add(new BubbleChartRenderer(chart, mAnimator, mViewPortHandler));
break;
case LINE:
if (chart.getLineData() != null)
mRenderers.add(new LineChartRenderer(chart, mAnimator, mViewPortHandler));
break;
case CANDLE:
if (chart.getCandleData() != null)
mRenderers.add(new CandleStickChartRenderer(chart, mAnimator, mViewPortHandler));
break;
case SCATTER:
if (chart.getScatterData() != null)
mRenderers.add(new ScatterChartRenderer(chart, mAnimator, mViewPortHandler));
break;
}
}
}
Aggregations