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!
-- 
View this message in context: 
http://n4.nabble.com/Graphs-using-Zend-Framework-tp1593094p1599528.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to