Quantcast

Graphs using Zend Framework

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Graphs using Zend Framework

Razorblade
Hello,
I'm wondering if is there any component to manage graph using Zend Framework ( like jpgraph for example ) or if I have to use an external php library.
I've already searched the documentation, I did not find any.
Thanks

Sergio





Chiacchiera con i tuoi amici via Webcam su Messenger. Videochiamali!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Graphs using Zend Framework

Ralph Schindler-2
There is no graphing component in ZF.

You might want to have a look at this proposal:

http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+-+Dolf+Schimmel

But you also might want to have a look at a few other technologies:

   * jpgraph you already mentioned is very good
   * outputing XML from the controller to
http://www.maani.us/xml_charts/ is also an option (i've used xml/swf
charts in the past)
   * things that look interesting from google:
      * http://www.ebrueggeman.com/phpgraphlib/
      * http://sparkline.org/

Good luck!
Ralph

Sergio Rinaudo wrote:

> Hello,
> I'm wondering if is there any component to manage graph using Zend
> Framework ( like jpgraph for example ) or if I have to use an external
> php library.
> I've already searched the documentation, I did not find any.
> Thanks
>
> Sergio
>
>
>
>
> ------------------------------------------------------------------------
> Chiacchiera con i tuoi amici via Webcam su Messenger. Videochiamali!
> <http://www.messenger.it/videoconversazioni.aspx>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Graphs using Zend Framework

Razorblade
Thank you Ralph, 
is exactly what I wanted to know.
Do you ( or anybody else ) have any advice how to implement swf charts in ZF?
Thanks

Sergio








------------

There is no graphing component in ZF.

You might want to have a look at this proposal:

http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+-+Dolf+Schimmel

But you also might want to have a look at a few other technologies:

* jpgraph you already mentioned is very good
* outputing XML from the controller to
http://www.maani.us/xml_charts/ is also an option (i've used xml/swf
charts in the past)
* things that look interesting from google:
* http://www.ebrueggeman.com/phpgraphlib/
* http://sparkline.org/

Good luck!
Ralph

Sergio Rinaudo wrote:

> Hello,
> I'm wondering if is there any component to manage graph using Zend
> Framework ( like jpgraph for example ) or if I have to use an external
> php library.
> I've already searched the documentation, I did not find any.
> Thanks
>
> Sergio
>
>
>
>

Oltre 20 giochi per Messenger. Provali subito!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Graphs using Zend Framework

kilowatt303
Here is how i set up OpenFlash charts (http://teethgrinder.co.uk/open-flash-chart/)
Controller action:
public function statsAction(){
        $this->_helper->viewRenderer->setNoRender(true);
        $this->_helper->layout->disableLayout();
        $transactions = new Orders();
        $data = $transactions->fetchPreviousMonth();
        require_once('OFC/OFC_Chart.php');

        $title = new OFC_Elements_Title('Orders');

        //$line_dot = new OFC_Charts_Line();
        $line_dot = new OFC_Charts_Line_Hollow();
        $line_dot->set_values($data->toArray());

        $chart = new OFC_Chart();
        $chart->set_bg_colour('ffffff');
        $chart->set_title( $title );
        $chart->add_element( $line_dot );

        echo $chart->toPrettyString();
    }
View:
<?
$this->headScript()->appendFile('/js/swfobject.js');
$this->headScript()->appendScript('
    swfobject.embedSWF(
"/swf/open-flash-chart.swf", "chart",
"940", "400", "9.0.0", "expressInstall.swf",
{"data-file":"/index/stats"} );');
?>
<div id="chart">
</div>

Hope it helps!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Graphs using Zend Framework

Razorblade
In reply to this post by Razorblade
Thank you guys for all your advices,
I've discovered some free charts I didn't even know thanks to you all.

Actually, for my project, I decided to use Fusion Charts ( http://www.fusioncharts.com/free/demos/ ),
I found them really nice to see and complete.

Bye!

Sergio


Oltre 20 giochi per Messenger. Provali subito!
Loading...