JFreeChart graphics with image map

UI Components for JSF
Post Reply
syphinx
Posts: 24
Joined: 09 Nov 2010, 16:50

22 Apr 2011, 09:11

Hi

I create dynamic images with JFreeChart. It works great.

Now I want to add image map to the charts. I can generate the map string at backing bean but cannot pass it to view. Becuase it is generated at the second request which image is generated.


Code: Select all


public class HistogramBean {
         
        private StreamedContent chart;
	private String imageMap;

        public HistogramBean() { 
                
                FreeChart jFreeChart = .......;
	        File chartFile = new File (.........);
        	ChartRenderingInfo info = new ChartRenderingInfo(........);
	        ChartUtilities.saveChartAsPNG(....................... , info);
        	chart = new DefaultStreamedContent(.......................);
        	imageMap = ImageMapUtilities.getImageMap(....................);
                logger.debug(imageMap);
        }
imageMap string is logged correctly. But it is empty at view side, since it is generated at the second request.

How can I get the generated string correctly?

Thanks,


Primefaces 3.0.M1
Mojarra 2.0.4

johnevi
Posts: 3
Joined: 04 Nov 2011, 20:18

04 Nov 2011, 20:21

syphinx,

I have the same issue. Did you ever figure this out? Thanks.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 48 guests