final class \SmartImgBizCharts
{
} ->
- Language: PHP
- Located at: modules/smart-extra-libs/lib_charts.php
- Package: extralibs:ViewComponents
- Namespace: \
- Class Name: SmartImgBizCharts
- Version: v.20210307
- Depends: classes: Smart
- Usage: dynamic object: (new Class())->method() - This class provides only DYNAMIC methods
public function __construct (
$y_type,
$y_title,
$y_arr_data,
$y_format = "png"
) {} @
public function generate (
$y_mode = "raw"
) {} ->
public $width ->
public $height ->
public $axis_x_label ->
public $axis_y_label ->
public $labelcolor ->
public $defaultcolor ->
public $left ->
public $top ->
public $right ->
public $bottom ->
public $x_mark ->
public $y_mark ->
public $bgcolor ->
public $framecolor ->
public $axiscolor ->
public $markcolor ->
public $debug ->
<?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
documentation generated on: 2023-10-19 23:15:59 +0000
Smart.Framework © 2009-2023 unix-world.org