final class \SmartImgGfxCharts
{
} ->
- Language: PHP
- Located at: modules/smart-extra-libs/lib_charts.php
- Package: extralibs:ViewComponents
- Namespace: \
- Class Name: SmartImgGfxCharts
- 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",
$y_display_graph2 = true,
$y_display_graph_depths = true
) {} @
public function generate (
$y_mode = "raw"
) {} ->
public $axis_x ->
public $axis_y ->
public $axis_dec ->
public $tsize ->
public $size ->
public $h3d ->
<?php
// Sample Usage:
//--
$chart = new SmartImgGfxCharts(
'vbars', // vbars, hbars, dots, lines, pie, donut
"Title goes here",
array(
array(
'x' => "white",
'y' => Smart::random_number(10,90),
'z' => Smart::random_number(10,90),
'w' => 10,
'v' => '#ECECEC'
),
array(
'x' => "red",
'y' => 22.45,
'z' => Smart::random_number(10,90),
'w' => 25,
'v' => '#FF3300'
),
array(
'x' => "blue",
'y' => Smart::random_number(10,90),
'z' => Smart::random_number(10,90),
'w' => 7,
'v' => '#003399'
),
array(
'x' => "yellow",
'y' => Smart::random_number(10,90),
'z' => Smart::random_number(10,90),
'w' => 17,
'v' => '#FFCC00'
),
array(
'x' => "green",
'y' => Smart::random_number(10,90),
'z' => Smart::random_number(10,90),
'w' => 31,
'v' => '#33CC33'
),
array(
'x' => "black",
'y' => Smart::random_number(10,90),
'z' => Smart::random_number(10,90),
'w' => 17,
'v' => '#333333'
)
),
'png'
);
$chart->axis_x = 'X-Axis';
$chart->axis_y = 'Y-Axis';
//--
header('Content-Type: '.$chart->mime_header());
header('Content-Disposition: '.$chart->disposition_header());
echo $chart->generate();
//--
// #end php code
documentation generated on: 2023-10-19 23:15:59 +0000
Smart.Framework © 2009-2023 unix-world.org