Hi Yeeswar,
I recently had exactly the same requirement, and solved it in the same
way referenced in the wiki page.
So then I rewrote my solution as a "DisplayChart" component, which
takes a chart as a parameter and handles the rest of the work for you.
A few notes/comments, though:
1) In my case, the chart wasn't generated from parameters in the url,
per se. So I initially had problems with the browser caching the chart
image because even though the chart had changed, the url was the
same. I solved that issue by generating an identifier key for the
chart that ensures that different charts get different urls.
2) I create the byte array outside of the StreamResponse. That way I
can set the content length (and any other properties I want) in
"prepareResponse"
3) The Wiki article uses jpeg compression. PNG is better for charts,
and just as easy to do with the JFreeChart API.
If you're interested in my "DisplayChart" code, write me off list and
I'll send it along.
Robert
On Jul 10, 2008, at 7/107:43 AM , Lance Java wrote:
This should help
http://wiki.apache.org/tapestry/Tapestry5HowToCreatePieChartsInAPage
2008/7/10 Yeeswara Nadapana (HCL Financial Services) <
[EMAIL PROTECTED]>:
Hi,
I am new to Tapestry. Using Tapestry 5.0.10 with my application. I
need
to display a chart image on my application using dynamic data. I am
using JFreeChart for that. But, I couldn't get the way to display the
image on my page.
I have to display the image while rendering the page, not as an
ActionLink. Can anyone help with this?
Regards,
Yeeswar
DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential
and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily
reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure,
modification,
distribution and / or publication of
this message without the prior written consent of the author of
this e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]