JFreeChart: how to change XYPlot foreground color?
Asked Answered
B

1

4

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?

Banderole answered 29/10, 2010 at 12:58 Comment(0)
F
6

eg:

XYItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.CYAN);
Flak answered 29/10, 2010 at 18:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.