Stacked棒グラフ
graph.php
<?php include_once("ChartStackedBar.php"); $chart_data = array ( array ( NULL, "1001", "1002", "1003", "1004" ), array ( 'hoge', 30, 30, 63, 100 ), array ( 'foo', 30, 30, 63, 100 ), array ( 'bar', 30, 30, 63, 100 )); $obj = new ChartStackedBar(); $obj->set_chart_data($chart_data); $obj->SendChartData(); ?>
ChartStackedBar.php
<?php include "charts.php"; class ChartStackedBar { public $_chart = array(); function __construct() { $this->_chart['chart_type'] = 'stacked bar'; $this->_chart[ 'chart_value' ] = array ( 'prefix' => "", 'suffix' => "", 'decimals' => 0, 'decimal_char' => ".", 'separator' => "", 'position' => "left", 'hide_zero' => true, 'as_percentage' => true, 'font' => "Arial", 'bold' => true, 'size' => 10, 'color' => "FFFFFF", 'alpha' => 90 ); } function set_chart_data($chart_data) { $this->_chart['chart_data'] = $chart_data; } function SendChartData() { SendChartData ($this->_chart); } } ?>