Ok. thanks Chris, this I do:

1º- I create the controller ::

<?php
class StatsController extends AppController {
var $name = 'Stats';
    function index() {
        $chart [ 'chart_data' ] = array ( array ( "", "2004", "2006",
"2006", "2007" ),

      array ( "Computers", 5, 10, 30, 63 ),

      array ( "Phones", 100, 20, 65, 55 ),

      array ( "Other", 56, 21, 5, 90 )

      );
$this->set('chart',$chart);
    }
}
?>

2º I Create the view

<?php vendor('charts');
SendChartData($chart);
echo InsertChart ('/img/charts.swf', "/charts_library", '/Stats/
index/' . uniqid(rand(), true), 800, 250, 'FFFFFF')
?>

I put::
charts.swf into /app/webroot/img directory
charts.php into /app/vendors directory
directory charts_library into /app/webroot directory

but when I call http://localhost/Probe/Stats only look array info in
plain text

well: 2004  2006  2006  2007    Computers  5  10  30  63    Phones
100  20  65  55  Other  56  21  5  90



On 23 nov, 13:15, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Nov 23, 2007 1:27 PM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
> > in the view? or where?, the problem is that don't look the graph, in
> > the view I look data of array
>
> Hi there,
>
> I'm the guy who wrote the tutorial you referenced above.  That block
> of code you talked about goes into the view.  I thought it was very
> clear in the tutorial, but perhaps the language barrier is a problem.
>
> If there's anything I can do to make it clearer, let me know.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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