本文整理汇总了PHP中open_flash_chart::toString方法的典型用法代码示例。如果您正苦于以下问题:PHP open_flash_chart::toString方法的具体用法?PHP open_flash_chart::toString怎么用?PHP open_flash_chart::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类open_flash_chart
的用法示例。
在下文中一共展示了open_flash_chart::toString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: line
$user_line->colour('#0099cc');
$user_line->set_key('User', 14);
$grp_line = new line();
$grp_line->set_values($groups_added);
$grp_line->colour('#990000');
$grp_line->set_key('Groups', 14);
$max = $max;
$steps = round($max / 5, 0.49);
$y = new y_axis();
$y->set_range(0, $max, $steps);
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($vid_line);
$chart->add_element($user_line);
$chart->add_element($grp_line);
$x_labels = new x_axis_labels();
$x_labels->set_steps(1);
$x_labels->set_vertical();
$x_labels->set_colour('#A2ACBA');
$x_labels->set_labels($year);
$x = new x_axis();
$x->set_colour('#A2ACBA');
$x->set_grid_colour('#D7E4A3');
$x->set_offset(false);
$x->set_steps(4);
// Add the X Axis Labels to the X Axis
$x->set_labels($x_labels);
$chart->set_x_axis($x);
$chart->set_y_axis($y);
echo $chart->toString();
示例2: microtime
<?php
require_once 'php-ofc-library/open-flash-chart.php';
// generate some random data
srand((double) microtime() * 1000000);
$max = 20;
$tmp = array();
for ($i = 0; $i < 13; $i++) {
$tmp[] = rand(0, $max);
}
$title = new title(date("D M d Y"));
$bar = new bar();
$bar->set_values(array(3, 2, 3, 4, 5, 6, 7, 8, 9, 3, 12, 4));
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
$path = "data.json.inc";
$file = fopen($path, "w");
fwrite($file, $chart->toString());
fclose($file);
示例3: array
/**
* assign the chartdata object for open flash chart library
* @param $config
* @return unknown_type
*/
function _setChartdata($config)
{
$model = $this->getModel();
$rounds = $this->get('Rounds');
$round_labels = array();
foreach ($rounds as $r) {
$round_labels[] = $r->name;
}
$division = $this->get('division');
$data = $model->getDataByDivision($division->id);
//create a line
$length = count($rounds) - 0.5;
$linewidth = $config['color_legend_line_width'];
$lines = array();
//$title = $division->name;
$chart = new open_flash_chart();
//$chart->set_title( $title );
$chart->set_bg_colour($config['bg_colour']);
//colors defined for ranking table lines
//todo: add support for more than 2 lines
foreach ($this->colors as $color) {
foreach ($rounds as $r) {
for ($n = $color['from']; $n <= $color['to']; $n++) {
$lines[$color['color']][$n][] = $n;
}
}
}
//set lines on the graph
foreach ($lines as $key => $value) {
foreach ($value as $line => $key2) {
$chart->add_element(hline($key, $length, $line, $linewidth));
}
}
//load team1, first team in the dropdown
$team = $this->team1;
$d = new $config['dotstyle_1']();
$d->size((int) $config['line1_dot_strength']);
$d->halo_size(1);
$d->colour($config['line1']);
$d->tooltip('Rank: #val#');
$line = new line();
$line->set_default_dot_style($d);
$line->set_values($team->rankings);
$line->set_width((int) $config['line1_strength']);
$line->set_key($team->name, 12);
$line->set_colour($config['line1']);
$line->on_show(new line_on_show($config['l_animation_1'], $config['l_cascade_1'], $config['l_delay_1']));
$chart->add_element($line);
//load team2, second team in the dropdown
$team = $this->team2;
$d = new $config['dotstyle_2']();
$d->size((int) $config['line2_dot_strength']);
$d->halo_size(1);
$d->colour($config['line2']);
$d->tooltip('Rank: #val#');
$line = new line();
$line->set_default_dot_style($d);
$line->set_values($team->rankings);
$line->set_width((int) $config['line2_strength']);
$line->set_key($team->name, 12);
$line->set_colour($config['line2']);
$line->on_show(new line_on_show($config['l_animation_2'], $config['l_cascade_2'], $config['l_delay_2']));
$chart->add_element($line);
$x = new x_axis();
if ($config['x_axis_label'] == 1) {
$xlabels = new x_axis_labels();
$xlabels->set_labels($round_labels);
$xlabels->set_vertical();
}
$x->set_labels($xlabels);
$x->set_colours($config['x_axis_colour'], $config['x_axis_colour_inner']);
$chart->set_x_axis($x);
$x_legend = new x_legend(JText::_('COM_JOOMLEAGUE_CURVE_ROUNDS'));
$x_legend->set_style('{font-size: 15px; color: #778877}');
$chart->set_x_legend($x_legend);
$y = new y_axis();
$y->set_range(count($data), 1, -1);
$y->set_colours($config['x_axis_colour'], $config['x_axis_colour_inner']);
$chart->set_y_axis($y);
$y_legend = new y_legend(JText::_('COM_JOOMLEAGUE_CURVE_RANK'));
$y_legend->set_style('{font-size: 15px; color: #778877}');
$chart->set_y_legend($y_legend);
ob_clean();
echo $chart->toString();
}
示例4: renderHTML
//.........这里部分代码省略.........
$i = $i + 1;
$chart_vals[$i] = new bar_stack_value($yidx - $ul_nat['SIPPING'], $chart_colors[$c++ % $chart_colors_size]);
$chart_vals[$i]->set_tooltip('No SIP Ping<br>#val#');
$bar_stack->append_stack($chart_vals);
$chart_lbls[$lidx++] = 'SIP Ping';
$chart_vals = array();
$i = 0;
$chart_vals[$i] = new bar_stack_value($ul_proto['UDP'], $chart_colors[$c++ % $chart_colors_size]);
$chart_vals[$i]->set_tooltip('UDP<br>#val#');
$i = $i + 1;
$chart_vals[$i] = new bar_stack_value($ul_proto['TCP'], $chart_colors[$c++ % $chart_colors_size]);
$chart_vals[$i]->set_tooltip('TCP<br>#val#');
$i = $i + 1;
$chart_vals[$i] = new bar_stack_value($ul_proto['TLS'], $chart_colors[$c++ % $chart_colors_size]);
$chart_vals[$i]->set_tooltip('TLS<br>#val#');
$i = $i + 1;
$chart_vals[$i] = new bar_stack_value($ul_proto['SCTP'], $chart_colors[$c++ % $chart_colors_size]);
$chart_vals[$i]->set_tooltip('SCTP<br>#val#');
$bar_stack->append_stack($chart_vals);
$chart_lbls[$lidx++] = 'Transports';
$cn_x_labels->set_labels($chart_lbls);
$x = new x_axis();
$x->set_labels($cn_x_labels);
$y = new y_axis();
$y->set_range(0, $yidx, $yidx / 10);
$cn_chart = new open_flash_chart();
$cn_chart->set_title($cn_title);
$cn_chart->add_element($bar_stack);
$cn_chart->set_x_axis($x);
$cn_chart->add_y_axis($y);
$sHTML = '';
$sHTML .= '
<div align="center">
<p><b>Processed ' . $yidx . ' records.</b></p>
</div>
';
if ($yidx > 0) {
$sHTML .= '
<script type="text/javascript" src="' . APP_URL . '/js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF(
"' . APP_URL . '/modules/ser/pages/open-flash-chart.swf",
"div_chart_ul_uas",
"600", "300", "9.0.0", "expressInstall.swf",
{"get-data":"get_data_ul_uas"} );
swfobject.embedSWF(
"' . APP_URL . '/modules/ser/pages/open-flash-chart.swf",
"div_chart_ul_met",
"600", "300", "9.0.0", "expressInstall.swf",
{"get-data":"get_data_ul_met"} );
swfobject.embedSWF(
"' . APP_URL . '/modules/ser/pages/open-flash-chart.swf",
"div_chart_ul_cns",
"600", "300", "9.0.0", "expressInstall.swf",
{"get-data":"get_data_ul_cns"} );
</script>
';
$sHTML .= '
<br />
<div align="center">
<div id="div_chart_ul_uas">
</div>
<br />
<br />
<div id="div_chart_ul_met">
</div>
<br />
<br />
<div id="div_chart_ul_cns">
</div>
<br />
<br />
</div>
';
$sHTML .= '
<script type="text/javascript">
function get_data_ul_uas()
{
data = \'' . $ul_uas_chart->toString() . '\';
return data;
}
function get_data_ul_met()
{
data = \'' . $mt_chart->toString() . '\';
return data;
}
function get_data_ul_cns()
{
data = \'' . $cn_chart->toString() . '\';
return data;
}
</script>
';
}
/* if $yidx */
return $sHTML;
}
示例5: flowview_viewchart
/** flowview_viewchart()
*
* This function is taken from Slowlog. Given
* a title, chart type and chart data, it will
* echo the required syntax for the Callback
* from the chart page to operate corectly.
*/
function flowview_viewchart()
{
global $colors, $config;
include $config['base_path'] . "/plugins/flowview/lib/open-flash-chart-object.php";
include $config['base_path'] . "/plugins/flowview/lib/open-flash-chart.php";
$title = $_REQUEST["title"];
$chart_type = "bar";
$column = $_REQUEST["type"];
$sessionid = $_REQUEST["session"];
/* get the chart data from the session */
if (isset($_SESSION['flowview_flows'][$sessionid]['data'])) {
$data = $_SESSION['flowview_flows'][$sessionid]['data'];
} else {
$filter = createfilter($sessionid);
$data = $_SESSION['flowview_flows'][$sessionid]['data'];
}
switch ($column) {
case 'flows':
$unit = ucfirst($column);
$suffix = "Total Flows";
$_SESSION['sess_flows_flows'] = 'on';
break;
case 'bytes':
$unit = ucfirst($column);
$suffix = "Bytes Exchanged";
$_SESSION['sess_flows_bytes'] = 'on';
break;
case 'packets':
$unit = ucfirst($column);
$suffix = "Packets Examined";
$_SESSION['sess_flows_packets'] = 'on';
break;
}
$columns = $_SESSION['flowview_flows'][$sessionid]['columns'];
foreach ($columns as $key => $cdata) {
if (strtolower($cdata) == $column) {
$column = $key;
}
}
if (sizeof($data)) {
$elements = array();
$legend = array();
$maxvalue = 0;
if (isset($_REQUEST['exclude']) && $_REQUEST['exclude'] > 0) {
for ($i = 0; $i < $_REQUEST['exclude']; $i++) {
array_shift($data);
}
}
foreach ($data as $row) {
if ($maxvalue < $row[$column]) {
$maxvalue = $row[$column];
$scaling = flowview_autoscale($row[$column]);
}
}
$maxvalue = flowview_getmax($maxvalue);
$autorange = flowview_autoscale($maxvalue);
$maxvalue = $maxvalue / $autorange[0];
$i = 0;
foreach ($data as $row) {
$elements[$i] = new bar_value(round($row[$column] / $autorange[0], 3));
$elements[$i]->set_colour(flowview_get_color());
$elements[$i]->set_tooltip($unit . ": #val# " . $autorange[1]);
if (sizeof($row) == 4) {
$legend[] = $row[0];
} else {
$legend[] = $row[0] . " -\n" . $row[1];
}
$i++;
}
$bar = new bar_glass();
$bar->set_values($elements);
$title = new title($title . " (" . $suffix . ")");
$title->set_style("{font-size: 18px; color: #444444; text-align: center;}");
$x_axis_labels = new x_axis_labels();
$x_axis_labels->set_size(10);
$x_axis_labels->rotate(45);
$x_axis_labels->set_labels($legend);
$x_axis = new x_axis();
//$x_axis->set_3d( 3 );
$x_axis->set_colours('#909090', '#909090');
$x_axis->set_labels($x_axis_labels);
$y_axis = new y_axis();
$y_axis->set_offset(true);
$y_axis->set_colours('#909090', '#909090');
$y_axis->set_range(0, $maxvalue, $maxvalue / 10);
$y_axis->set_label_text("#val# " . $autorange[1]);
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
$chart->set_x_axis($x_axis);
$chart->add_y_axis($y_axis);
$chart->set_bg_colour('#FEFEFE');
echo $chart->toString();
//.........这里部分代码省略.........
示例6: loadaverage
function loadaverage()
{
sleep(1);
$uptime = trim(shell_exec("cat /proc/uptime |awk '{print \$1}' |cut -d '.' -f 1"));
$load_average_1min = trim(shell_exec("cat /proc/loadavg |awk '{print \$1}'"));
$load_average_5min = trim(shell_exec("cat /proc/loadavg |awk '{print \$2}'"));
$load_average_15min = trim(shell_exec("cat /proc/loadavg |awk '{print \$3}'"));
if ($load_average_1min <= 1) {
$stats = '当前系统空闲';
} elseif ($load_average_1min <= 4) {
$stats = '当前系统正常';
} else {
$stats = '当前系统繁忙';
}
$days = floor($uptime / 86400);
$hours = floor($uptime % 86400 / 3600);
$minutes = floor($uptime % 3600 / 60);
$title = new title("系统平均负载\n{$stats}");
$title->set_style("{font-size: 12px; font-family: Times New Roman; font-weight: bold; color: #A2ACBA; text-align: center;}");
settype($load_average_1min, "float");
settype($load_average_5min, "float");
settype($load_average_15min, "float");
$load_average = array($load_average_1min, $load_average_5min, $load_average_15min);
function colour($value)
{
if ($value <= 1) {
$colour = "#339900";
} elseif ($value <= 4) {
$colour = "#FFFF00";
} else {
$colour = "#FF0033";
}
return $colour;
}
if (max($load_average) <= 0.5) {
$y_axis_max = 0.5;
} elseif (max($load_average) <= 1) {
$y_axis_max = 1;
} elseif (max($load_average) <= 5) {
$y_axis_max = 5;
} elseif (max($load_average) <= 10) {
$y_axis_max = 10;
} elseif (max($load_average) <= 50) {
$y_axis_max = 50;
} else {
$y_axis_max = 100;
}
$y_axis_step = $y_axis_max / 5;
if ($load_average_1min == 0) {
$data[0] = new bar_value($y_axis_max / 100);
$data[0]->set_colour(colour($load_average_1min));
$data[0]->set_tooltip(0);
} else {
$data[0] = new bar_value($load_average_1min);
$data[0]->set_colour(colour($load_average_1min));
$data[0]->set_tooltip('#val#');
}
if ($load_average_5min == 0) {
$data[1] = new bar_value($y_axis_max / 100);
$data[1]->set_colour(colour($load_average_5min));
$data[1]->set_tooltip(0);
} else {
$data[1] = new bar_value($load_average_5min);
$data[1]->set_colour(colour($load_average_5min));
$data[1]->set_tooltip('#val#');
}
if ($load_average_15min == 0) {
$data[2] = new bar_value($y_axis_max / 100);
$data[2]->set_colour(colour($load_average_15min));
$data[2]->set_tooltip(0);
} else {
$data[2] = new bar_value($load_average_15min);
$data[2]->set_colour(colour($load_average_15min));
$data[2]->set_tooltip('#val#');
}
$bar = new bar_glass();
$bar->set_values($data);
$x = new x_axis();
$x->set_labels_from_array(array('1分钟', '5分钟', '15分钟'));
$y = new y_axis();
$y->set_range(0, $y_axis_max, $y_axis_step);
$chart = new open_flash_chart();
$chart->set_title($title);
$chart->add_element($bar);
$chart->set_bg_colour('#FFFFFF');
$chart->set_x_axis($x);
$chart->set_y_axis($y);
$x_legend = new x_legend("系统当前已运行 {$days} 天 {$hours} 小时 {$minutes} 分钟");
$x_legend->set_style('{font-size: 12px; color: #778877}');
$chart->set_x_legend($x_legend);
header("Cache-Control: cache, must-revalidate");
header("Pragma: public");
echo $chart->toString();
}
示例7: siremis_get_chart_data
//.........这里部分代码省略.........
$ymin = $ydata[$i][$k];
}
if ($ydata[$i][$k] > $ymax) {
$ymax = $ydata[$i][$k];
}
}
}
$k = $k + 1;
}
$ofcobj = new open_flash_chart();
$ctitle = $chart->GetTitle();
$rev = 0;
if ($chart->GetOrder() && $chart->GetOrder() == "reverse") {
$rev = 1;
}
$x = new x_axis();
$xstep = (int) ($k / 20);
if ($k % 20 != 0) {
$xstep = $xstep + 1;
}
$x->set_steps($xstep);
if ($xydata[0]->getXYType() == "timestamp") {
if ($rev == 1) {
$time_min = $xdata[$k - 1];
$time_max = $xdata[0];
} else {
$time_min = $xdata[0];
$time_max = $xdata[$k - 1];
}
$ctitle .= " - From " . date('Y-m-d H:i:s', $time_min);
$ctitle .= " To " . date('Y-m-d H:i:s', $time_max);
$time_x_labels = new x_axis_labels();
$time_x_labels->rotate(20);
$chart_lbls = array();
for ($i = 0; $i < $k; $i = $i + 1) {
if ($rev == 0) {
$chart_lbls[] = date('H:i', $xdata[$i]);
} else {
$chart_lbls[] = date('H:i', $xdata[$k - $i - 1]);
}
}
$time_x_labels->visible_steps($xstep);
$time_x_labels->set_labels($chart_lbls);
$x->set_labels($time_x_labels);
} else {
$time_x_labels->visible_steps($xstep);
if ($rev == 1) {
$ctitle .= " - From " . $xdata[$k - 1] . " To " . $xdata[0];
} else {
$ctitle .= " - From " . $xdata[0] . " To " . $xdata[$k - 1];
}
}
$ofcobj->set_title(new title($ctitle));
$dot_style = new dot();
$dot_style->size(3)->halo_size(1);
for ($i = 0; $i < $yn; $i++) {
if ($chart->GetChartType() == "area") {
$line[$i] = new area();
$line[$i]->set_fill_alpha(0.3);
$line[$i]->set_default_dot_style($dot_style);
} else {
if ($chart->GetChartType() == "line_dot") {
$line[$i] = new line_dot();
$line[$i]->set_default_dot_style($dot_style);
} else {
$line[$i] = new line();
$line[$i]->set_default_dot_style($dot_style);
}
}
if ($xydata[$i + 1]->GetXYColor() && $xydata[$i + 1]->GetXYColor() != "") {
$line[$i]->set_colour($xydata[$i + 1]->GetXYColor());
}
if ($xydata[$i + 1]->GetXYTitle() && $xydata[$i + 1]->GetXYTitle() != "") {
$line[$i]->set_key($xydata[$i + 1]->GetXYTitle(), 10);
} else {
$line[$i]->set_key("Key " . $i, 10);
}
if ($rev == 1) {
$line[$i]->set_values(array_reverse($ydata[$i]));
} else {
$line[$i]->set_values($ydata[$i]);
}
$ofcobj->add_element($line[$i]);
}
if ($ymax > 10) {
$y = new y_axis();
if ($ymin > 10) {
$y->set_range($ymin - 10, $ymax, (int) (($ymax - $ymin + 10) / 10));
} else {
$y->set_range(0, $ymax, (int) ($ymax / 10));
}
$ofcobj->set_y_axis($y);
}
$ofcobj->set_x_axis($x);
if ($chart->GetBGColor() && $chart->GetBGColor() != "") {
$ofcobj->set_bg_colour($chart->GetBGColor());
}
// return $ofcobj->toPrettyString();
return $ofcobj->toString();
}
示例8: make_bandwidth_chart
private static function make_bandwidth_chart($values, $options = array())
{
if (!$values || !count($values)) {
return false;
}
$title = !empty($options['title']) ? $options['title'] : 'Chart';
//array_check_value($options, 'title', 'BI Chart');
$step = !empty($options['step']) ? $options['step'] : 0.75;
//array_check_value($options, 'step', 0.75);
$max = !empty($options['max']) ? $options['max'] : 0;
//array_check_value($options, 'max', 0);
$value_mod = !empty($options['value_modifier']) ? $options['value_modifier'] : 1;
//array_check_value($options, 'value_modifier', 1);
$input_title = !empty($options['input_title']) ? $options['input_title'] : 'Downloads for :key: #val#';
//array_check_value($options, 'input_title', 'Downloads for :key: #val#');
$output_title = !empty($options['output_title']) ? $options['output_title'] : 'Uploads for :key: #val#';
//array_check_value($options, 'output_title', 'Uploads for :key: #val#');
$total_title = !empty($options['total_title']) ? $options['total_title'] : 'Total for :key: #val#';
//array_check_value($options, 'total_title', 'Total for :key: #val#');
$on_click = !empty($options['on_click']) ? $options['on_click'] : false;
//array_check_value($options, 'on_click', false);
$x_labels = !empty($options['x_labels']) ? $options['x_labels'] : array_keys($values);
//array_check_value($options, 'x_labels', array_keys($values));
include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_title.php';
include_once APP_FOLDER . '/libraries/php-ofc-library/open-flash-chart.php';
//include(APP_FOLDER . '/libraries/php-ofc-library/ofc_bar_glass_value.php');
include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_line_dot.php';
include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_line_base.php';
include_once APP_FOLDER . '/libraries/php-ofc-library/ofc_x_axis.php';
$title = new title($title);
$chart = new open_flash_chart();
$chart->set_title($title);
$input = array();
$ouput = array();
$total = array();
$clicks = array();
foreach ($values as $key => $value) {
$this_value = (double) number_format($value['input'] / $value_mod, 2, '.', '');
$tmp = new bar_glass_value($this_value);
$tmp->set_tooltip(preg_replace('/:key/', $key, $input_title));
$input[] = $tmp;
$this_value = (double) number_format($value['output'] / $value_mod, 2, '.', '');
$tmp = new bar_glass_value($this_value);
$tmp->set_tooltip(preg_replace('/:key/', $key, $output_title));
$output[] = $tmp;
$this_value = (double) number_format(($value['input'] + $value['output']) / $value_mod, 2, '.', '');
$tmp = new dot_value($this_value, '#000066');
$tmp->set_tooltip(preg_replace('/:key/', $key, $total_title));
$total[] = $tmp;
if ($on_click) {
$tmp = (double) number_format(($value['input'] + $value['output']) / $value_mod, 2, '.', '');
$clicks[] = $tmp;
}
$max = ceil(max(($value['input'] + $value['output']) / $value_mod, $max));
}
$x_axis = new x_axis();
$x_axis->set_labels_from_array($x_labels);
$x_axis->set_3d(5);
$x_axis->colour = '#909090';
if ($max > 0) {
//Don't know why we sometimes get a division by zero error
@($max = $max + ($step - $max % $step));
}
if ($max / $step > 5) {
$step = floor($max / 5);
} else {
if ($max / $step <= 1) {
$step = floor($max / 2);
}
}
$y_axis = new y_axis();
$y_axis->set_range(0, $max, $step);
$input_bar = new bar_glass();
$input_bar->set_values($input);
$input_bar->colour = '#D54C78';
$output_bar = new bar_glass();
$output_bar->set_values($output);
$output_bar->colour = '#78D54C';
$total_graph = new line_hollow();
$total_graph->set_colour('#9999FF');
$total_graph->set_values($total);
if ($on_click) {
$click_graph = new line();
$click_graph->set_values($clicks);
$click_graph->set_on_click($on_click);
$chart->add_element($click_graph);
}
$chart->set_x_axis($x_axis);
$chart->set_y_axis($y_axis);
$chart->add_element($input_bar);
$chart->add_element($output_bar);
$chart->add_element($total_graph);
//$decoded = json_decode($chart->toString());
return $chart->toString();
}
示例9: renderHTML
//.........这里部分代码省略.........
$line[$i]->set_key("XYZ", 10);
$line[$i]->set_values($acc_records['inviteXYZ']);
$ivsobj->add_element($line[$i]);
$i++;
$val = max($acc_records['invite200']);
if ($ymax < $val) {
$ymax = $val;
}
$val = max($acc_records['invite404']);
if ($ymax < $val) {
$ymax = $val;
}
$val = max($acc_records['invite487']);
if ($ymax < $val) {
$ymax = $val;
}
$val = max($acc_records['inviteXYZ']);
if ($ymax < $val) {
$ymax = $val;
}
$val = min($acc_records['invite200']);
if ($ymin > $val) {
$ymin = $val;
}
$val = min($acc_records['invite404']);
if ($ymin > $val) {
$ymin = $val;
}
$val = min($acc_records['invite487']);
if ($ymin > $val) {
$ymin = $val;
}
$val = min($acc_records['inviteXYZ']);
if ($ymin > $val) {
$ymin = $val;
}
if ($ymax > 10) {
$y = new y_axis();
if ($ymin > 10) {
$y->set_range($ymin - 10, $ymax, (int) (($ymax - $ymin + 10) / 10));
} else {
$y->set_range(0, $ymax, (int) ($ymax / 10));
}
$ivsobj->set_y_axis($y);
}
$ivsobj->set_x_axis($x);
$ivsobj->set_bg_colour("#C0C0A0");
$sHTML = '';
$sHTML .= '
<div align="center">
<p><b>Processed ' . $yidx . ' records. <br />Timezone: ' . date_default_timezone_get() . ' </b></p>
</div>
';
if ($yidx > 0) {
$sHTML .= '
<script type="text/javascript" src="' . APP_URL . '/js/swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF(
"' . APP_URL . '/modules/ser/pages/open-flash-chart.swf",
"div_chart_acc_methods",
"600", "300", "9.0.0", "expressInstall.swf",
{"get-data":"get_data_acc_methods"} );
swfobject.embedSWF(
"' . APP_URL . '/modules/ser/pages/open-flash-chart.swf",
"div_chart_acc_invites",
"600", "300", "9.0.0", "expressInstall.swf",
{"get-data":"get_data_acc_invites"} );
</script>
';
$sHTML .= '
<br />
<div align="center">
<div id="div_chart_acc_methods">
</div>
<br />
<br />
<div id="div_chart_acc_invites">
</div>
<br />
<br />
</div>
';
$sHTML .= '
<script type="text/javascript">
function get_data_acc_methods()
{
data = \'' . $mtsobj->toString() . '\';
return data;
}
function get_data_acc_invites()
{
data = \'' . $ivsobj->toString() . '\';
return data;
}
</script>
';
}
/* if $yidx */
return $sHTML;
}