<?php
// Sample Usage (in a controller):
//--
$chart = new SmartImgBizCharts(
'matrix', // currently, only matrix type is stable and implemented
'Chart Title',
array(
'Chart 1' => array(
'red' => array('x'=>Smart::random_number(5,7), 'y'=>Smart::random_number(100,120), 'z'=>Smart::random_number(45,75), 'color'=>'#FF3300', 'labelcolor'=>'#003399'),
'blue' => array('x'=>Smart::random_number(100,115), 'y'=>Smart::random_number(200,210), 'z'=>Smart::random_number(20,50), 'color'=>'#003399'),
'green' => array('x'=>Smart::random_number(150,175), 'y'=>Smart::random_number(250,270), 'z'=>Smart::random_number(2,8), 'color'=>'#33CC33'),
'yellow' => array('x'=>Smart::random_number(400,420), 'y'=>Smart::random_number(70,90), 'z'=>Smart::random_number(50,90), 'color'=>'#FFCC00'),
'default' => array('x'=>Smart::random_number(300,325), 'y'=>Smart::random_number(300,320))
)
),
'png'
);
$chart->width = 500;
$chart->height = 500;
$chart->axis_x_label = 'Relative Market Share';
$chart->axis_y_label = 'Market Growth Rate';
//--
$this->PageViewSetCfg('rawpage', true);
$this->PageViewSetCfg('rawmime', $chart->mime_header());
$this->PageViewSetCfg('rawdisp', $chart->disposition_header());
$this->PageViewSetVar('main', $chart->generate());
//--
// #end php code