我試圖讓jfreechart PieChart3D隱藏標籤。我在文檔中找不到任何東西。在jfreechart/PiePlot3D餅圖上隱藏標籤
任何人都知道如何做到這一點?
<% response.setContentType("image/png"); %><%@page import="org.jfree.data.general.*"%><%@page import="org.jfree.chart.*"%><%@page import="org.jfree.chart.plot.*"%><%@page import="java.awt.Color" %><%
DefaultPieDataset ds = (DefaultPieDataset)session.getAttribute("usagePieOutputDataset");
JFreeChart chart = ChartFactory.createPieChart3D
(
null, // Title
ds, // Dataset
false, // Show legend
false, // Use tooltips
false // Configure chart to generate URLs?
);
chart.setBackgroundPaint(Color.WHITE);
chart.setBorderVisible(false);
PiePlot3D plot = (PiePlot3D)chart.getPlot();
plot.setDepthFactor(0.0);
plot.setLabelOutlinePaint(Color.LIGHT_GRAY);
plot.setLabelFont(new java.awt.Font("Arial", java.awt.Font.BOLD, 10));
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, 150, 144);
%>
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/plot/PiePlot3D.html
你檢查我的答案?沒有評論它,也沒有被接受。這不適合你嗎?或者不是你想要的? – jitter 2009-11-29 20:43:43