You've outlined the two approaches. Either you generate the chart twice or store the image for later retrieval. You have to decide which concerns you more, CPU to generate the chart or memory to store it.

I don't know how what backs the chart's image stream, but I'd probably generate the image and store that for later... If your really worried about performance then you can stick ehcache in there to hold the map and image so that page refreshes just grab the already generated content from memory or disk.

-- Josh

On May 27, 2010, at 7:32 AM, paha <ch_pa...@yahoo.com> wrote:


Hi, i have a question:
what is the best approach to extend
http://wiki.apache.org/tapestry/Tapestry5HowToCreateGenericGraphComponent
GenericGraphComponent to output an image map along with the chart itself.
for now i have only one idea.
1) create and process chart in beginRender to obtain CharRenderingInfo
(needed to produce image map)
2) generate and output image map in beginRender
3) create and process chart again in onChart event to return the
StreamResponce

the obvious issue is the need to generate the chart twice or export it to image twice. i don't think persisting the chart/input stream is the best
idea, unless there are no other approaches.
--
View this message in context: 
http://old.nabble.com/Rendering-Chart-and-ImageMap-on-the-page-tp28693905p28693905.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to