您可以使用 RGB 值为饼图的每个切片指定颜色PiePlot.setSectionPaint http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/PiePlot.html#setSectionPaint%28java.lang.Comparable,%20java.awt.Paint%29.
这是一个例子:
DefaultPieDataset result = new DefaultPieDataset();
result.setValue("1", 40.);
result.setValue("2", 30.);
result.setValue("3", 20.);
result.setValue("4", 10.);
JFreeChart chart = ChartFactory.createPieChart3D("", result, true, true, false);
PiePlot3D plot = (PiePlot3D) chart.getPlot();
plot.setBackgroundPaint(new Color(255, 255, 255, 0));
plot.setSectionPaint("1", new Color(31, 73, 125));
plot.setSectionPaint("2", new Color(192, 80, 77));
plot.setSectionPaint("3", new Color(155, 187, 89));
plot.setSectionPaint("4", new Color(128, 100, 162));