Smart.Framework Logo

final class \SmartImgBizCharts
{ } ->

Class: SmartImgBizCharts - Generates IMG Biz Charts


class Methods

public function __construct ( $y_type, $y_title, $y_arr_data, $y_format = "png" ) {} @ 
public function mime_header ( ) {} -> 
public function disposition_header ( $y_filename = "biz-chart" ) {} -> 
public function generate ( $y_mode = "raw" ) {} -> 

class Properties

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 ->

class Constants


Sample code: PHP

<?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: 2024-12-16 17:13:21 +0000


Smart.Framework © 2009-2024 unix-world.org