JFreeChart BarChart -> NO gradient
2022-09-01 11:35:37
默认情况下,我的条形图始终以渐变颜色绘制。我只想要一个简单的颜色,没有任何样式的效果。
任何人都可以帮忙吗?
法典:
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
谢谢