I do it this way with jpgraph
// create a cached image <?php date_chart($rows, "years.png"); ?>
<!-- display cached image --> <center><img src="jpgraph_cache/years.png"></center></br>
<table>...</table>
function date_chart($rows, $aCachedName) { $graph = new Graph(512,384,$aCachedName, 0, false);
// .......... }
Change jpgraph constants USE_CACHE, READ_CACHE and CACHE_DIR to enable caching and put appropriate permissions on the cache dir.
- cnb
On Tue, 4 Sep 2012 09:58:23 +0530 "Kapil Karekar" kapil_karekar@hotmail.com wrote:
Hi Chandrashekhar,
Thanks for the reply. In your mail you have mentioned that: "You can't send html tags before displaying an image if you're generating it in that script."
However I need to display some results in a tabulated form and then show a number of pie-charts based on those results.
So there should be some way of interleaving html tags with dynamically generated images.
Any help will be really appreciated.
Regards,
Kapil