1
JFreeChart 라이브러리를 사용하여 중공 원형 차트를 만들려면 어떻게해야합니까? 그 다음 사람이 내가이 예처럼 속이 빈 원형 차트를 만드는 데 사용할 수있는 라이브러리 추천 할 수 JFreeChart의를 사용 할 수없는 경우JFreeChart 라이브러리를 사용하여 중공 원형 차트를 만드는 방법
: JFreeChart가에
JFreeChart 라이브러리를 사용하여 중공 원형 차트를 만들려면 어떻게해야합니까? 그 다음 사람이 내가이 예처럼 속이 빈 원형 차트를 만드는 데 사용할 수있는 라이브러리 추천 할 수 JFreeChart의를 사용 할 수없는 경우JFreeChart 라이브러리를 사용하여 중공 원형 차트를 만드는 방법
: JFreeChart가에
의 수를, 이런 식으로 뭔가를 시도하십시오. 풋 아웃
RingPlot plot = new RingPlot(dataset);
StringBuffer chartFileName = new StringBuffer(Integer.toString(generatedCharts)).append(Long.toString(System.currentTimeMillis())).append(".png");
JFreeChart chart = new JFreeChart("", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
chart.setBackgroundPaint(new GradientPaint(new Point(0, 0), new Color(20, 20, 20), new Point(400, 200), Color.DARK_GRAY));
TextTitle t = chart.getTitle();
t.setHorizontalAlignment(org.jfree.ui.HorizontalAlignment.LEFT);
t.setPaint(new Color(240, 240, 240));
t.setFont(new Font("Arial", Font.BOLD, 26));
plot.setBackgroundPaint(null);
plot.setOutlineVisible(false);
plot.setLabelGenerator(null);
plot.setSectionDepth(0.35);
plot.setSectionOutlinesVisible(false);
plot.setSimpleLabels(true);
plot.setShadowPaint(null);
plot.setOuterSeparatorExtension(0);
plot.setInnerSeparatorExtension(0);
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{1}",new DecimalFormat("#,##0"), new DecimalFormat("0.000%")));
plot.setLabelBackgroundPaint(null);
plot.setLabelOutlinePaint(null);
Font font=new Font("",0,16);
plot.setLabelFont(font);
chart.getLegend().setFrame(BlockBorder.NONE);
chart.getLegend().setPosition(RectangleEdge.BOTTOM);
chart.setBackgroundPaint(java.awt.Color.white);
chart.setPadding(new RectangleInsets(4, 8, 2, 2));
이 될 것입니다