JFreeChart: how to change XYPlot foreground color?

北战南征 提交于 2019-12-07 15:11:42

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!