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?
eg:
XYItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.CYAN);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.