问题
The JFreeChart XYPlot background color is changed using setBackgroundPaint()
but there doesn't seem to be a corresponding setForegroundPaint()
.
XYPlot plot = (XYPlot) chart.getPlot();
plot.setBackgroundPaint(Color.BLACK);
How is the foreground color (the plot) changed?
回答1:
eg:
XYItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.CYAN);
来源:https://stackoverflow.com/questions/4052083/jfreechart-how-to-change-xyplot-foreground-color