/** @package admin::graphs @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: banner_yearly.php v1.0 2013-08-08 datazen $ */ function lc_banner_yearly($_id) { global $lC_Database, $lC_Language, $lC_Vqmod; require $lC_Vqmod->modCheck('external/panachart/panachart.php'); $lC_ObjectInfo = new lC_ObjectInfo(lC_Banner_manager_Admin::getData($_id)); $image_extension = lc_dynamic_image_extension(); $views = array(); $clicks = array(); $vLabels = array(); $stats = array(); $Qstats = $lC_Database->query('select year(banners_history_date) as year, sum(banners_shown) as value, sum(banners_clicked) as dvalue from :table_banners_history where banners_id = :banners_id group by year'); $Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_id); $Qstats->execute(); while ($Qstats->next()) { $stats[] = array($Qstats->valueInt('year'), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[] = $Qstats->valueInt('value'); $clicks[] = $Qstats->valueInt('dvalue'); $vLabels[] = $Qstats->valueInt('year'); } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($lC_Language->get('subsection_heading_statistics_yearly'), $lC_ObjectInfo->get('banners_title')), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, ''); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_yearly-' . $_id . '.' . $image_extension); return $stats; }
/** @package admin::graphs @author Loaded Commerce @copyright Copyright 2003-2014 Loaded Commerce, LLC @copyright Portions Copyright 2003 osCommerce @license https://github.com/loadedcommerce/loaded7/blob/master/LICENSE.txt @version $Id: banner_daily.php v1.0 2013-08-08 datazen $ */ function lc_banner_daily($_id, $_month, $_year) { global $lC_Database, $lC_Language, $lC_Vqmod; require $lC_Vqmod->modCheck('external/panachart/panachart.php'); $lC_ObjectInfo = new lC_ObjectInfo(lC_Banner_manager_Admin::getData($_id)); $image_extension = lc_dynamic_image_extension(); $views = array(); $clicks = array(); $vLabels = array(); $days = @date('t', @mktime(0, 0, 0, $_month)) + 1; $stats = array(); for ($i = 1; $i < $days; $i++) { $stats[] = array($i, '0', '0'); $views[$i - 1] = 0; $clicks[$i - 1] = 0; $vLabels[] = $i; } $Qstats = $lC_Database->query('select dayofmonth(banners_history_date) as banner_day, banners_shown as value, banners_clicked as dvalue from :table_banners_history where banners_id = :banners_id and month(banners_history_date) = :month and year(banners_history_date) = :year'); $Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_id); $Qstats->bindInt(':month', $_month); $Qstats->bindInt(':year', $_year); $Qstats->execute(); while ($Qstats->next()) { $stats[$Qstats->valueInt('banner_day') - 1] = array($Qstats->valueInt('banner_day'), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[$Qstats->valueInt('banner_day') - 1] = $Qstats->valueInt('value'); $clicks[$Qstats->valueInt('banner_day') - 1] = $Qstats->valueInt('dvalue'); } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($lC_Language->get('subsection_heading_statistics_daily'), $lC_ObjectInfo->get('banners_title'), @strftime('%B', @mktime(0, 0, 0, $_month)), $_year), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, ''); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_daily-' . $_id . '_' . $_month . '.' . $image_extension); return $stats; }
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example6"); $chart->plot($data, false, "black", "lines"); $chart->stroke(); ?>
$Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_REQUEST['banners_id']); $Qstats->bindInt(':year', $year); $Qstats->execute(); while ($Qstats->next()) { $stats[$Qstats->valueInt('banner_month') - 1] = array(strftime('%b', mktime(0, 0, 0, $Qstats->valueInt('banner_month'), 1, $year)), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[$Qstats->valueInt('banner_month') - 1] = $Qstats->valueInt('value'); $clicks[$Qstats->valueInt('banner_month') - 1] = $Qstats->valueInt('dvalue'); } $vLabels = array(); for ($i = 1; $i < 13; $i++) { $vLabels[] = strftime('%b', mktime(0, 0, 0, $i, 1, $year)); if (!isset($views[$i - 1])) { $views[$i - 1] = 0; } if (!isset($clicks[$i - 1])) { $clicks[$i - 1] = 0; } } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($osC_Language->get('subsection_heading_statistics_monthly'), $title, $year), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, $year); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_monthly-' . $_REQUEST['banners_id'] . '.png');
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example22"); $chart->plot($data4, false, "blue"); $chart->add_legend("Gross", "blue"); $chart->plot($data); $chart->add_legend("Net"); $chart->stroke(); ?>
if ($_GET[tam] == "peq") { $width = 300; $height = 100; } if ($_GET[tam] == "mini") { $width = 200; $height = 100; } // Creamos el tamaño de la imagen //$chart = new chart($width, $height); $hora = date("i"); $nombrecache = "ticker-" . $_GET["ticker"] . "-" . $_GET["tam"] . "-" . $_GET["dias"] . "-" . $hora; $chart = new chart($width, $height, $nombrecache . ".png"); // Elegimos que media móvil dibujar if ($_GET[mm3]) { $chart->plot($mm3, false, "red"); $chart->add_legend("MM3", "red"); } if ($_GET[mm10]) { $chart->plot($mm10, false, "green"); $chart->add_legend("MM10", "green"); } //Dibujamos el cierre if ($_GET[cierre]) { $chart->plot($cierre, false, "black", "cross", false, 4); } //Dibujamos apertura if ($_GET[apertura]) { $chart->plot($apertura, false, "gray", "box", "black"); } // Dibujamos el valor de color azul
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example3-1"); $chart->plot($data, false, "white"); $chart->set_grid_color("black"); $chart->set_background_color("blue", "ForestGreen"); $chart->set_title("Title, background and border"); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example8"); $chart->plot($data, false, "black", "points"); $chart->stroke(); ?>
<?php header("content-Type: image/png"); require "./lib/panachart.php"; $vCht4 = array(60, 40, 20, 34, 5, 52, 41, 20, 34, 43, 64, 40); $vCht5 = array(12, 21, 36, 27, 14, 23, 3, 5, 29, 23, 12, 5); $vCht6 = array(5, 7, 3, 15, 7, 8, 2, 2, 2, 11, 22, 3); $vLabels = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $o = new chart(640, 480, 5, '#eeeeee'); $o->setTitle("MegaSena", "#000000", 4); $o->setPlotArea(SOLID, "#444444", '#dddddd'); $o->setFormat(0, ',', '.'); $o->addSeries($vCht4, 'dot', 'n1', SOLID, '#000000', '#0000ff'); $o->addSeries($vCht4, 'line', 'n1', SOLID, '#000000', '#0000ff'); $o->addSeries($vCht5, 'dot', 'n2', SOLID, '#000000', '#0000ff'); $o->addSeries($vCht5, 'line', 'n2', SOLID, '#000000', '#0000ff'); $o->addSeries($vCht6, 'dot', 'n3', SOLID, '#000000', '#0000ff'); $o->addSeries($vCht6, 'line', 'n3', SOLID, '#000000', '#0000ff'); $o->setXAxis('#000000', SOLID, 1, "X Axis"); $o->setYAxis('#000000', SOLID, 2, ""); $o->setLabels($vLabels, '#000000', 1, VERTICAL); $o->setGrid("#bbbbbb", DASHED, "#bbbbbb", DOTTED); $o->plot('');
$dates = b1n_calcGetDates($d['ini'], $d['fin']); $c = new chart(800, 600, 5, '#eeeeee'); $c->setTitle('MegaSena', '#000000', 4); $c->setPlotArea(SOLID, '#444444', '#dddddd'); $c->setXAxis('#000000', SOLID, 2, ''); $c->setYAxis('#000000', SOLID, 2, ''); $c->setFormat(0, ',', '.'); $c->setLabels($dates, '#000000', 1, VERTICAL); $i = 1; $aux = array(); $aux[0] = 0; $v = 0; foreach ($ret as $r) { if (in_array($r['data'], $dates)) { $v = 10; } else { $v = -1; } if ($aux[$i - 1] <= 0) { $v = 0; } $aux[] = $aux[$i - 1] + $v; $i++; } $c->addSeries($aux, "line", "nl", SOLID, "#000000", "#0000ff"); $c->addSeries($aux, "dot", "nl", SOLID, "#000000", "#0000ff"); $c->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); // Img header('Content-Type: image/png'); $c->plot('');
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example25"); $chart->plot($data, false, "gray", "box", "black"); $chart->stroke(); ?>
// AREAS LINES $iTime = microtime(); $k++; $ochart1 = new chart(300, 130, 7, '#eeeeee'); $ochart1->setTitle("Area & line", "#000000", 2); $ochart1->setPlotArea(SOLID, "#000000", '#ddeedd'); $ochart1->setFormat(0, ',', '.'); $ochart1->addSeries($vCht5, 'area', 'Series1', SOLID, '#000000', '#ffffaa'); $ochart1->addSeries($vCht6, 'area', 'Series2', SOLID, '#000000', '#ffaaaa'); $ochart1->addSeries($vCht4, 'line', 'Series3', DASHED, '#000000', '#0000ff'); $ochart1->addSeries($vCht4, 'dot', 'Series4', SOLID, '#000000', '#0000ff'); $ochart1->setXAxis('#000000', SOLID, 1, ""); $ochart1->setYAxis('#000000', SOLID, 1, ""); $ochart1->setLabels($vLabels, '#000000', 1, HORIZONTAL); $ochart1->setGrid("#bbbbbb", DOTTED, "#bbbbbb", DOTTED); $ochart1->plot("{$k}.png"); $vTime[$k] = microtime() - $iTime; /* // BAR $iTime = microtime(); $k++; $ochart = new chart(300,130,7, '#eeeeee'); $ochart->setTitle("Bar plot","#000000",2); $ochart->setPlotArea(SOLID,"#aaaaaa", '#ffffff'); $ochart->setFormat(0,',','.'); $ochart->addSeries($vCht5,'bar','Series1', SOLID,'#444444', '#aa4444'); $ochart->setXAxis('#000000', SOLID, 1, ""); $ochart->setYAxis('#000000', SOLID, 1, ""); $ochart->setLabels($vLabels, '#000000', 1, HORIZONTAL); $ochart->setGrid("#cccccc", DASHED, "", DOTTED); $ochart->plot("$k.png"); $vTime[$k] = microtime() - $iTime;
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example11"); $chart->plot($data, false, "black", "cross", false, 4); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example2"); $chart->plot($data3, false, "blue", "impulse"); $chart->plot($data); $chart->stroke(); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Chart Test</title> </head> <body> <h4>Modulus Video Chart:</h4> <?php $mygraph = new chart(300, 200); $mygraph->plot($data); $mygraph->stroke(); ?> </body> </html>
<?php require 'lib/chart.php'; include_once 'datos.php'; //$chart = new chart(600, 100); $hora = date("i"); $nombrecache = "volumen-" . $_GET["ticker"] . "-" . $_GET["dias"] . "-" . $hora; $chart = new chart(600, 100, $nombrecache . ".png"); $chart->plot($volumen, false, "blue", "impulse"); $chart->set_x_ticks($fecha, $format = "text"); $chart->set_title($_GET[ticker] . " - http://sukiweb.net"); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example24"); $chart->plot($data, false, "gray", "triangle", "black"); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example21"); $chart->set_grid_color("pink", false); $chart->plot($data, false, "blue", "gradient", "green", 7); $chart->plot($data, false, "red", "gradient", "yellow", 0); $chart->stroke(); ?>
$percentage[$i] = ($am[$i]/$total) * 100; }*/ if(is_array($bar)){ $ochart = new chart(400,250,5, '#eeeeee'); //chart($width, $height, $margin, $backgroundColor) $ochart->setTitle('Statistics on Property Locations (By Classification: Tax Payment)','#000000',2); //setTitle($title, $textColor, $font) $ochart->setPlotArea(SOLID,'#444444', '#dddddd'); //setPlotArea($style, $strokeColor, $fillColor) $ochart->setFormat(0,',','.'); //setFormat($numberOfDecimals, $thousandsSeparator, $decimalSeparator) $ochart->setXAxis('#000000', SOLID, 1, 'Classification'); //setXAxis($color, $style, $font, $title) $ochart->setYAxis('#000000', SOLID, 2, 'Tax Payment'); //setYAxis($color, $style, $font, $title) $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); //setGrid($colorHorizontal, $styleHorizontal, $colorVertical, $styleVertical) $ochart->setLabels($bar, '#000000', 1, VERTICAL); //setLabels(&$labels, $textColor, $font, $direction) $ochart->addSeries($am,'bar','', SOLID,'#000000', '#0000ff'); //addSeries(&$values, $plotType, $title, $style, $strokeColor, $fillColor) // $ochart->plot(''); //plot($file) */ $ochart->plot('graphs/'.$brgyID.''.$classification.'imgTP.png'); $out = fopen("viewGraphs.php", "w"); //fwrite($out,"<a href='t.php'>Back</a><br>"); fwrite($out, "<table cellspacing=5 cellpadding=4 border=0 align='center'>"); // for($i=4; $i<=4; $i++){ $sout.='<tr><td><img border=0 src="graphs/'.$brgyID.''.$classification.'imgTP.png"></td></tr>'; //} fwrite($out, "$sout\n"); fwrite($out, '</table>'); fclose($out); }else{ $out = fopen("viewGraphs.php", "w"); fwrite($out,"<center>Error: Empty Values.Cannot generate graphs.<br></center>"); fclose($out); }
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example9"); $chart->plot($data, false, "black", "impulse"); $chart->stroke(); ?>
$ochart->setXAxis('#000000', SOLID, 1, 'Barangay'); //setXAxis($color, $style, $font, $title) $ochart->setYAxis('#000000', SOLID, 2, 'Tax Payment'); //setYAxis($color, $style, $font, $title) $ochart->setLabels($bar, '#000000', 1, VERTICAL); //setLabels(&$labels, $textColor, $font, $direction) $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); //setGrid($colorHorizontal, $styleHorizontal, $colorVertical, $styleVertical) $ochart->addSeries($percentage,'bar','', SOLID,'#000000', '#0000ff'); //addSeries(&$values, $plotType, $title, $style, $strokeColor, $fillColor) $ochart->plot('graphs/2.png'); //plot($file) */ $ochart = new chart(600,320,5, '#eeeeee'); //chart($width, $height, $margin, $backgroundColor) $ochart->setTitle(' Distribution of Properties (Tax Payment)','#000000',2); //setTitle($title, $textColor, $font) $ochart->setPlotArea(SOLID,'#444444', '#dddddd'); //setPlotArea($style, $strokeColor, $fillColor) $ochart->setFormat(0,',','.'); //setFormat($numberOfDecimals, $thousandsSeparator, $decimalSeparator) $ochart->setXAxis('#000000', SOLID, 1, 'Barangay'); //setXAxis($color, $style, $font, $title) $ochart->setYAxis('#000000', SOLID, 2, 'Tax Payment'); //setYAxis($color, $style, $font, $title) $ochart->setLabels($bar, '#000000', 1, VERTICAL); //setLabels(&$labels, $textColor, $font, $direction) $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); //setGrid($colorHorizontal, $styleHorizontal, $colorVertical, $styleVertical) $ochart->addSeries($am,'bar','', SOLID,'#000000', '#0000ff'); //addSeries(&$values, $plotType, $title, $style, $strokeColor, $fillColor) $ochart->plot('graphs/3.png'); //plot($file) */ $out = fopen("viewGraphs.php", "w"); // fwrite($out,"<a href='t.php'>Back</a><br>"); fwrite($out, "<table cellspacing=5 cellpadding=4 border=0 align='center'>"); for($i=2; $i<=3; $i++){ $sout.='<tr><td><img border=0 src="graphs/'.$i.'.png"></td></tr>'; } fwrite($out, "$sout\n"); fwrite($out, '</table>'); fclose($out); ?> <script language="JavaScript"> window.location="viewGraphs.php"; </script>
$xs = array(); $ys = array(); foreach ($points as $point) { $xs[] = $point[0]; $ys[] = $point[1]; } return array($xs, $ys); } function shade($color1, $color2, $proportion) { $color1 = rgb_color($color1); $color2 = rgb_color($color2); return array((int) ($color1[0] * $proportion + $color2[0] * (1.0 - $proportion)), (int) ($color1[1] * $proportion + $color2[1] * (1.0 - $proportion)), (int) ($color1[2] * $proportion + $color2[2] * (1.0 - $proportion))); } // Background $chart->plot(array(1, 1), array($start, $end), "white", "gradient", "white", 0); // The current area $current = array(); $future = array(); $last = array(0, 0.0); foreach ($graph as $point) { if ($point[0] >= $now) { if ($last[0] < $now) { $current[] = array($now, $last[1]); $future = array(array($now, $last[1])); } $future[] = $point; } else { if ($point[1] >= 0.0 && $last[1] <= 0.0 || $point[1] <= 0.0 && $last[1] >= 0.0) { $current = array($point); } else {
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example20"); $chart->set_grid_color("black", false); $chart->plot($data, false, "blue", "gradient", "black", 7); $chart->plot($data, false, "red", "gradient", "black", 0); $chart->stroke(); ?>
if ($_SESSION[create_graph] == "yes") { $_SESSION[no_header] = "yes"; $pdf->AddPage($_SESSION[pdf_layout]); $pdf->AliasNbPages(); $pdf->SetFont('Arial', '', 8); require "chart.php"; $data = explode(",", $pdf_graph_values); if ($_SESSION[pdf_layout] == "P") { $chart = new chart(535, 720); } elseif ($_SESSION[pdf_layout] == "L") { $chart = new chart(785, 485); } if ($_SESSION[pdf_graph_title] != "") { $chart->set_title("{$_SESSION['pdf_graph_title']}"); } if ($_SESSION[pdf_graph] == "line_graph") { $chart->plot($data, false, "black"); } elseif ($_SESSION[pdf_graph] == "bar_graph") { $chart->plot($data, false, "black", "impulse"); } elseif ($_SESSION[pdf_graph] == "box_graph") { $chart->plot($data, false, "gray", "box", "black"); } $chart->stroke(); $pdf->Ln(); if ($_SESSION[pdf_layout] == "P") { $pdf->Image("pdf_image.png", 10, 20); } elseif ($_SESSION[pdf_layout] == "L") { $pdf->Image("pdf_image.png", 10, 20); } } $pdf->Output();
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example17"); $chart->plot($data, false, "red", "gradient", "black", 5); $chart->stroke(); ?>
$Qstats->bindTable(':table_banners_history', TABLE_BANNERS_HISTORY); $Qstats->bindInt(':banners_id', $_GET['bID']); $Qstats->bindInt(':year', $year); $Qstats->execute(); while ($Qstats->next()) { $stats[$Qstats->valueInt('banner_month') - 1] = array(strftime('%b', mktime(0, 0, 0, $Qstats->valueInt('banner_month'), 1, $year)), $Qstats->valueInt('value') > 0 ? $Qstats->valueInt('value') : '0', $Qstats->valueInt('dvalue') > 0 ? $Qstats->valueInt('dvalue') : '0'); $views[$Qstats->valueInt('banner_month') - 1] = $Qstats->valueInt('value'); $clicks[$Qstats->valueInt('banner_month') - 1] = $Qstats->valueInt('dvalue'); } $vLabels = array(); for ($i = 1; $i < 13; $i++) { $vLabels[] = strftime('%b', mktime(0, 0, 0, $i, 1, $year)); if (!isset($views[$i - 1])) { $views[$i - 1] = 0; } if (!isset($clicks[$i - 1])) { $clicks[$i - 1] = 0; } } $ochart = new chart(600, 350, 5, '#eeeeee'); $ochart->setTitle(sprintf($osC_Language->get('subsection_heading_statistics_monthly'), $osC_ObjectInfo->get('banners_title'), $year), '#000000', 2); $ochart->setPlotArea(SOLID, '#444444', '#dddddd'); $ochart->setFormat(0, ',', '.'); $ochart->setXAxis('#000000', SOLID, 1, $year); $ochart->setYAxis('#000000', SOLID, 2, ''); $ochart->setLabels($vLabels, '#000000', 1, VERTICAL); $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); $ochart->addSeries($views, 'area', 'Series1', SOLID, '#000000', '#0000ff'); $ochart->addSeries($clicks, 'area', 'Series1', SOLID, '#000000', '#ff0000'); $ochart->plot('images/graphs/banner_monthly-' . $_GET['bID'] . '.' . $osC_Template->image_extension);
//$vCht4 = array(1,20,20,34,5,52,41,20,34,43,64,40); // $vCht5 = array(12,21,36,27,14,23,3,5,29,23,12,5); // $vCht6 = array(5,7,3,15,7,8,2,2,2,11,22,3); // $vLabels = array('Jan','Feb','Mar','Apr','May','Jun','Jul' //,'Aug','Sep','Oct','Nov','Dec'); if(is_array($barangay)){ $ochart = new chart(400,250,5, '#eeeeee'); //chart($width, $height, $margin, $backgroundColor) $ochart->setTitle('Statistics on Property Locations (By Classification: Market Value)','#000000',2); //setTitle($title, $textColor, $font) $ochart->setPlotArea(SOLID,'#444444', '#dddddd'); //setPlotArea($style, $strokeColor, $fillColor) $ochart->setFormat(0,',','.'); //setFormat($numberOfDecimals, $thousandsSeparator, $decimalSeparator) $ochart->setXAxis('#000000', SOLID, 1, 'Classification'); //setXAxis($color, $style, $font, $title) $ochart->setYAxis('#000000', SOLID, 2, 'Amount'); //setYAxis($color, $style, $font, $title) $ochart->setGrid('#bbbbbb', DASHED, '#bbbbbb', DOTTED); //setGrid($colorHorizontal, $styleHorizontal, $colorVertical, $styleVertical) $ochart->setLabels($barangay, '#000000', 1, VERTICAL); //setLabels(&$labels, $textColor, $font, $direction) $ochart->addSeries($t,'bar','', SOLID,'#000000', '#0000ff'); //addSeries(&$values, $plotType, $title, $style, $strokeColor, $fillColor) $ochart->plot('graphs/'.$brgyID.''.$classification.'img.png'); //plot($file) $out = fopen("viewGraphs.php", "w"); //fwrite($out,"<a href='t.php'>Back</a><br>"); fwrite($out, "<table cellspacing=5 cellpadding=4 border=0 align='center'>"); // for($i=4; $i<=4; $i++){ $sout.='<tr><td><img border=0 src="graphs/'.$brgyID.''.$classification.'img.png"></td></tr>'; //} fwrite($out, "$sout\n"); fwrite($out, '</table>'); fclose($out); }else{ $out = fopen("viewGraphs.php", "w"); fwrite($out,"<center>Error: Empty Values.Cannot generate graphs.<br></center>"); fclose($out);
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example28"); $chart->plot($data, $data4, "blue", "fillgradient", "black", 0); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example26"); $chart->set_font("/usr/share/texmf/fonts/type1/adobe/utopia/putb8a.pfb", "type1"); $chart->set_title("Using The Adobe Utopia Font"); $chart->plot($data); $chart->stroke(); ?>
<?php require 'chart.php'; require 'data.php'; $chart = new chart(300, 200, "example30"); $chart->plot($data, $data4, "red", "fillgradient", "white", 0); $chart->plot($data, false, "black", "square"); $chart->plot($data4, false, "black", "square"); $chart->stroke(); ?>