public Plot configurePlot(Chart chart, ModelInfo info) {
return createPlot(chart, getModel(), info);
}
protected Plot createPlot(Chart chart, ChartModel model, ModelInfo info) {
final PieChartView chartView = (PieChartView) chart.getChartView();
if (info.isDataEmpty()) {
return new PiePlotAdapter(null, chart, chartView);
}
if (info.getNonEmptySeriesList().length < 2) {
PieDataset ds = ModelConverter.toPieDataset(model);
final Plot adapter = (chartView.isEnable3D())
? new PiePlot3DAdapter(ds, chart, chartView)
: new PiePlotAdapter(ds, chart, chartView);
return adapter;
}