Can't see background image for scatter plot with PrimeFaces

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gliesian
Posts: 6
Joined: Tue Dec 03, 2013 9:50 pm
antibot: No, of course not.

Can't see background image for scatter plot with PrimeFaces

Post by gliesian » Mon Jul 14, 2014 5:48 am

When using a background image for a scatter plot with JFreechart all works fine.
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");
and

Code: Select all

<p:graphicImage value="#{bullseyeBean.chart}" />
Any ideas why?

Thanks,
Robert

REF: http://forum.primefaces.org/viewtopic.p ... 78#p122978

Locked