Page 1 of 1

Looking for example to send graph direct to browser

Posted: Tue Jan 06, 2015 3:49 pm
by 15957564
The demos show a .png file being created. How do avoid that and send the graph to the browser without creating a .png file?

Re: Looking for example to send graph direct to browser

Posted: Wed Jan 07, 2015 9:32 am
by yeray
Hello,

The charts in TeeChart PHP must be created at server-side but instead of creating a png as follows:

Code: Select all

$chart->render("chart1.png"); 
You can directly send the stream calling the same function without parameters:

Code: Select all

$chart->render();

Re: Looking for example to send graph direct to browser

Posted: Wed Jan 07, 2015 2:08 pm
by 15957564
Hi,

Thanks for the reply. If I try that I get the following error message.

Fatal error: Call to undefined function imageftbbox() in /usr/local/uptime/GUI/teeChart/sources/GraphicsGD.php on line 2504

I need to have teeChart in a slightly unusual location... Do I have to do something special for that?

-Randy

Re: Looking for example to send graph direct to browser

Posted: Thu Jan 22, 2015 9:33 am
by narcis
Hello Randy,

Many apologies for the delayed reply.

Find attached an example calling render() without parameters and sending the chart to the browser as a stream. Hope this solves the problem at your end.