Java 自定义环图
我是JFreeChart的新手。我正在JFreeChart中创建自定义的环形图。我没有得到预期的输出Java 自定义环图,java,jfreechart,Java,Jfreechart,我是JFreeChart的新手。我正在JFreeChart中创建自定义的环形图。我没有得到预期的输出 private static JFreeChart createChart(PieDataset dataset) { CustomRingPlot plot = new CustomRingPlot(dataset); JFreeChart chart = new JFreeChart("Custom Ring Chart", JFreeChart.
private static JFreeChart createChart(PieDataset dataset) {
CustomRingPlot plot = new CustomRingPlot(dataset);
JFreeChart chart = new JFreeChart("Custom Ring Chart",
JFreeChart.DEFAULT_TITLE_FONT, plot, false);
plot.setBackgroundPaint(null);
plot.setOutlineVisible(false);
plot.setLabelGenerator(null);
plot.setSectionPaint("A", Color.ORANGE);
plot.setSectionPaint("B", new Color(100, 100, 100));
plot.setSectionDepth(0.50);
plot.setSectionOutlinesVisible(false);
plot.setShadowPaint(null);
plot.setSeparatorsVisible(false);
plot.setExplodePercent("A", 0.05);
plot.setExplodePercent("B", 0.05);
plot.setAutoPopulateSectionOutlinePaint(true);
plot.setSimpleLabels(true);
return chart;
}
预期产出:
实际产量:
您获得了什么样的输出以及期望得到什么?是否有任何日志等?感谢您的回复Sid,我已经编辑了问题的主体部分,并将预期输出和实际输出添加为图像。不清楚您的意思是什么:数据、颜色标签?请发表一篇文章,具体说明问题。数据问题。预期输出图像同时显示两个数据,但当前实际输出仅显示一个数据。如果标签生成器不为
null
?