【发布时间】:2011-10-27 22:12:43
【问题描述】:
默认情况下,我的条形图始终使用渐变色绘制。我只想要一种简单的颜色没有任何样式效果。
谁能帮忙?
代码:
final JFreeChart chart = ChartFactory.createBarChart(
"", // chart title
xLabel, // domain axis label
yLabel, // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
true, // include legend
false, // tooltips?
false // URLs?
);
final CategoryPlot plot = chart.getCategoryPlot();
// SOMETHING HAS TO BE DONE HERE
showChart(chart); // Simply shows the chart in a new window
谢谢
【问题讨论】:
-
粘贴您的代码。在大多数情况下,您应该添加一些代码以使其渐变,例如:GradientPaint
-
+1 以获得最真实的标题。 Web 2.0 再见!
标签: java colors jfreechart bar-chart