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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With