1

我设法更改了OverlaidXYPlotDemo1中条形的颜色,其中:

XYItemRenderer xir = plot.getRenderer();
xir.setSeriesPaint(0, Color.BLUE);

但是,我不能改变第二个系列的颜色

xir.setSeriesPaint(1, Color.GREY);

所以我可能错过了一些东西。有什么提示吗?

4

1 回答 1

1

我想到了。正确的方法是使用渲染器:

renderer1.setSeriesPaint(0, Color.YELLOW);
renderer2.setSeriesPaint(0, Color.GREY);
于 2012-10-25T11:48:21.207 回答