I do it quite often.  I have sites that generate images from gd and
sites that use ChartDirector.  In the controller turn off the
rendering engine
   $this->autoRender = false;
or
   $this->layout = '';

You might have to set the MIME type if JPGraph doesn't
                header("Content-type: image/png"); // or jpeg or gif, etc.

then output it
                print($c->makeChart2(PNG));

HTH,
David Lloyd
--
lloydhome consulting, inc.
http://www.lloydhome.com

On Feb 5, 8:00 am, "Macademic" <[EMAIL PROTECTED]> wrote:
> I am trying to get JPGraph working in Cake as a vendor.
>
> I have changed any references to include, include_once, require_once
> in the latest JPGraph distribution so there are no errors from nested
> include files.  My problem is that if I send  the output of the
> graphing function (i.e. using the $graph->Stroke() call at the end)
> the data for the img just gets included in the page rather than being
> rendered.
>
> So, how do I send back the img file to Cake?  Really, what I need is
> some way to stop the default.thtml file being used to spit back the
> data from the file in this particular function is called.  Can you do
> that in Cake?
>
> I tried using requestAction in my controller to pass the code back but
> it still does not work.
>
> Any suggestions?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to