e.g., xyPlot.setBackgroundImage(imageicon.getImage());
However, when I integrate it with Primefaces... the background image is not shown.
Code: Select all
JFreeChart jfreechart = createDemoPanel();
XYPlot xyPlot = (XYPlot) jfreechart.getPlot();
// Validate image was set
System.out.println("IMG1: " + xyPlot.getBackgroundImage());
File chartFile = new File("dynamichart");
ChartUtilities.saveChartAsPNG(chartFile, jfreechart, 600, 600);
chart = new DefaultStreamedContent(new FileInputStream(chartFile), "image/png");
Code: Select all
<p:graphicImage value="#{bullseyeBean.chart}" />
Thanks,
Robert
REF: http://forum.primefaces.org/viewtopic.p ... 78#p122978