I'm attempting to use this on my local machin(a mac) but when I put
the following code in, when i navigate to the page, it just dowloads a
plain text file instead of displaying the page? Any reasons why this
is happening? It is the same code that is in the bakery.


// Sets height and width
$flashChart->begin(400, 250);
// Title
$flashChart->title('Example 2 - Lines: Hits per Day');
// Configure Grid style and legends
$flashChart->configureGrid(
    array(
        'x_axis' => array(
            'step' => 1,
            'legend' => 'Day'
        ),
        'y_axis' => array(
            'legend' => '#Hits',
        )
    )
);
// Prepare some random data (10 points)
$random_hits = array();
for ($i=0; $i < 10; $i++) {
    $random_hits[] = rand(10,100);
}
// Register each data set with its information.
$data = array(
    'Hits' => array(
        'color' => '#00aa42',
        'font_size' => 11,
        'data' => $random_hits,
        'graph_style' => 'lines',
    )
);
$flashChart->setData($data);

// Set Ranges in the chart
$flashChart->setRange('y', 0, 100);
$flashChart->setRange('x', 0, 10);

// Show the graph
echo $flashChart->render();



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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