当前位置: 首页>>代码示例>>PHP>>正文


PHP graph::x_axis_colour方法代码示例

本文整理汇总了PHP中graph::x_axis_colour方法的典型用法代码示例。如果您正苦于以下问题:PHP graph::x_axis_colour方法的具体用法?PHP graph::x_axis_colour怎么用?PHP graph::x_axis_colour使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在graph的用法示例。


在下文中一共展示了graph::x_axis_colour方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: return_ofc_day

function return_ofc_day()
{
    global $cms, $ps;
    $styles =& $cms->theme->styles;
    $days = array();
    $labels = array();
    $data = array();
    $data_avg = array();
    $sum = 0;
    $avg = 0;
    $max = 31;
    $maxlimit = 100;
    // get the last 31 days of data
    $list = $ps->db->fetch_rows(1, "SELECT statdate,SUM(connections) connections " . "FROM {$ps->t_map_data} " . "GROUP BY statdate " . "ORDER BY statdate DESC LIMIT {$max}");
    $now = $list ? ymd2time($list[0]['statdate']) : time();
    while (count($days) < $max) {
        $days[date('Y-m-d', $now)] = 'null';
        $labels[] = date('M jS', $now);
        $now -= 60 * 60 * 24;
    }
    $days = array_reverse($days);
    $labels = array_reverse($labels);
    // build our data and labels
    $data = $days;
    $maxdata = 0;
    foreach ($list as $d) {
        if (!array_key_exists($d['statdate'], $days)) {
            continue;
        }
        $sum += $d['connections'];
        $data[$d['statdate']] = $d['connections'];
        $maxdata = max($maxdata, $d['connections']);
    }
    if ($data) {
        $avg = $sum / count($data);
        $data_avg[] = $avg;
        $data_avg = array_pad($data_avg, count($data), 'null');
        $data_avg[] = $avg;
        #		$data_avg = array_pad(array(), count($data), $avg);
        $maxlimit = ceil(ceil($maxdata / 100) * 100);
    }
    include_once PS_ROOTDIR . '/includes/ofc/open-flash-chart.php';
    $g = new graph();
    $g->bg_colour = $styles->val('flash.conn.bgcolor', 'flash.bgcolor');
    $g->title($styles->val('flash.conn.title', $cms->trans('Daily Connections'), true), '{' . $styles->val('flash.conn.title.style', 'font-size: 16px', true) . '}');
    #	$g->set_data($data_avg);
    #	$g->line(1, '#9999ee', 'Average Connections', 9);
    #	$g->set_data($data);
    ##	$g->line_hollow(1, 3, '#5555ff', 'Connections', 9);
    #	$g->bar(75, '#5555ff', 'Connections', 9);
    $avg_line = new line($styles->val('flash.conn.line.width'), $styles->val('flash.conn.line.color'));
    $avg_line->key($styles->val('flast.conn.line.key', $cms->trans('Average Connections'), true), $styles->val('flash.conn.line.size', 9, true));
    $avg_line->data = $data_avg;
    $conn_bar = new bar_3d($styles->val('flash.conn.bar3d.opacity', 75, true), $styles->val('flash.conn.bar3d.color1', '#5555ff', true), $styles->val('flash.conn.bar3d.color2', '#3333DD', true));
    $conn_bar->key($styles->val('flash.conn.bar3d.key', $cms->trans('Connections'), true), $styles->val('flash.conn.bar3d.size', 9, true));
    $conn_bar->data = $data;
    /*
    	$keys = array_keys($data);
    	for ($i=0; $i<count($data); $i++) {
    		$conn_bar->add_data_tip($data[$keys[$i]], 
    			$cms->trans("Connections: %d", $data[$keys[$i]]) . "<br>" . 
    			$cms->trans("Average: %d", $data_avg[0])
    		);
    	}
    /**/
    $g->set_tool_tip(sprintf($styles->val('flash.conn.tooltip', '#x_label#<br>#key#: #val# (' . $cms->trans('Avg') . ': %d)', true), round($data_avg[0])));
    $g->data_sets[] = $avg_line;
    $g->data_sets[] = $conn_bar;
    $g->set_x_axis_3d(6);
    // label each point with its value
    $g->set_x_labels($labels);
    //	$g->set_x_axis_steps(count($labels) / 3 + 1);
    //	$g->set_x_tick_size(1);
    $g->set_x_label_style(10, '#000000', 0, 3, '#cccccc');
    //	$g->set_x_label_style('none');
    #	$g->set_x_label_style( 8, '#000000', 2 );
    $g->set_inner_background(coalesce($styles->val('flash.conn.bg_inner1', 'flash.bg_inner1'), '#E3F0FD'), coalesce($styles->val('flash.conn.bg_inner2', 'flash.bg_inner2'), '#CBD7E6'), coalesce($styles->val('flash.conn.bg_inner_angle', 'flash.bg_inner_angle'), 90));
    $g->x_axis_colour('#909090', '#ADB5C7');
    //	$g->x_axis_colour('#eeeeee', '#eeeeee');
    $g->y_axis_colour('#5555ff', '#eeeeee');
    //	$g->set_x_offset( false );
    // set the Y max
    $g->set_y_min(0);
    $g->set_y_max($maxlimit);
    $g->set_y_legend($styles->val('flash.conn.bar3d.key', $cms->trans('Connections')), 12, $styles->val('flash.conn.bar3d.color1', '#5555ff', true));
    print $g->render();
}
开发者ID:Nerus87,项目名称:PsychoStats,代码行数:87,代码来源:overview.php

示例2: umc_donation_java_chart

function umc_donation_java_chart()
{
    global $UMC_SETTING;
    $sql_chart = "SELECT SUM(amount) as monthly, year(date) as date_year, month(date) as date_month FROM minecraft_srvr.`donations` GROUP BY YEAR(date), MONTH(date);";
    $D = umc_mysql_fetch_all($sql_chart);
    $lastdate = "2010-11";
    $ydata = array();
    $legend = array();
    $minval = $maxval = 0;
    $sum = 0;
    foreach ($D as $row) {
        $month = sprintf("%02d", $row['date_month']);
        $date = $row['date_year'] . '-' . $month;
        $datetime1 = new DateTime("{$lastdate}-01");
        $datetime2 = new DateTime("{$date}-01");
        $interval = $datetime1->diff($datetime2);
        $int = $interval->format('%m');
        $int--;
        for ($i = $int; $i > 0; $i--) {
            // echo "$i $int - ";
            $e_date = date("Y-m", mktime(0, 0, 0, $row['date_month'] - $i, 01, $row['date_year']));
            // $e_month = $row['date_month'] - $i;
            // $e_date = $row['date_year'] . '-' . $e_month;
            $sum = $sum - 135;
            $ydata[] = $sum;
            //echo $e_date . ": " . $sum . "<br>";
            $legend[] = $e_date . "-01";
            $maxval = max($sum, $maxval);
            $minval = min($sum, $minval);
        }
        $sum = $sum + $row['monthly'] - 135;
        //echo $date . ": " . $sum . "<br>";
        $ydata[] = $sum;
        $legend[] = $date . "-01";
        $lastdate = $date;
        $maxval = max($sum, $maxval);
        $minval = min($sum, $minval);
    }
    $outstanding = $sum * -1;
    require_once $UMC_SETTING['path']['html'] . '/admin/flash/open-flash-chart.php';
    $g = new graph();
    //$g->title("Donation Stats", '{font-size: 15px; color: #000000}');
    $g->bg_colour = '#FFFFFF';
    // Some data (line 1):
    $g->set_data($ydata);
    $legend1 = "Cost vs. donations balance in USD";
    $g->line(1, '#0000FF', $legend1, 10);
    // $g->set_y_legend( $legend1, 12, '#0000FF' );
    $g->set_y_max($maxval);
    $g->set_y_min($minval);
    $g->y_axis_colour('#0000FF', '#DFDFDF');
    $g->x_axis_colour('#DFDFDF', '#FFFFFF');
    $g->set_x_legend('Uncovery Minecraft Server uptime', 12, '#000000');
    // The X Axis labels are the time, 00:00, 01:00, 02:00 etc...
    $g->set_x_labels($legend);
    $g->set_x_label_style(8, '#000000', 1, 1, '#DFDFDF');
    // lines in the background
    $g->y_label_steps(10);
    $g->set_width('100%');
    $g->set_height(300);
    $g->set_output_type('js');
    $g->set_js_path('/admin/flash/');
    $g->set_swf_path('/admin/flash/');
    return array('chart' => $g->render(), 'outstanding' => $outstanding);
}
开发者ID:dani0010,项目名称:uncovery_me,代码行数:65,代码来源:donation.php

示例3: gmensuales

 function gmensuales($anio = '', $mes = '')
 {
     $this->load->library('Graph');
     if (empty($mes) or empty($anio)) {
         return;
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $mSQL = "SELECT DAYOFMONTH(fecha)as dia, fecha,\n\t\tsum(montonet*IF(tipo_doc='D', -1, 1)) AS grantotal, \n\t\tsum(inicial*IF(tipo_doc='D', -1, 1)) AS contado,\n\t\tsum(credito*IF(tipo_doc='D', -1, 1)) AS credito                                          \n \t\tFROM scst                                                                \n\t\tWHERE tipo_doc<>'X' AND fecha>='{$fechai}' AND fecha<='{$fechaf}'                  \n\t\tGROUP BY fecha ORDER BY fecha,grantotal DESC LIMIT 31";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->grantotal > $maxval) {
             $maxval = $row->grantotal;
         }
         $fecha[] = $row->dia;
         $data_1[] = $row->contado;
         $data_2[] = $row->credito;
         $data_3[] = $row->grantotal;
     }
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar(75, '#0000FF');
     $bar_2 = new bar(75, '#483D8B');
     $bar_3 = new bar(75, '#ADD8E6');
     $bar_1->key('Contado', 10);
     $bar_2->key('Credito', 10);
     $bar_3->key('Total', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
         $bar_2->add_data_tip($data_2[$i] / $om, graph::esc(number_format($data_2[$i], 2, ',', '.')));
         $bar_3->add_data_tip($data_3[$i] / $om, graph::esc(number_format($data_3[$i], 2, ',', '.')));
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Compras de en el mes ' . $mes . '/' . $anio, '{font-size: 16px; color:##00264A}');
         $g->data_sets[] = $bar_1;
         $g->data_sets[] = $bar_2;
         $g->data_sets[] = $bar_3;
         $g->x_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_x_labels($fecha);
         $g->set_x_label_style(10, '#000000', 3, 1);
         $g->set_x_axis_steps(10);
         $g->set_x_legend('Dias', 14, '#004381');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Dia: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->y_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_y_legend('Compras x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen ventas con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:60,代码来源:gcompras.php

示例4: gmensuales

 function gmensuales($anio = '', $mes = '')
 {
     $this->load->library('Graph');
     if (empty($mes) or empty($anio)) {
         return;
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $mSQL = "SELECT DAYOFMONTH(fecha)as dia, fecha,\n\t\tSUM(monto)AS grantotal,SUM(impuesto)AS IVA,SUM(transac)as transacciones \n\t\tfrom est_fecha where fecha>='{$fechai}' AND fecha<='{$fechaf}'\n\t\tGROUP BY  fecha                                                  \n\t\tORDER BY fecha ASC";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->grantotal > $maxval) {
             $maxval = $row->grantotal;
         }
         $fecha[] = $row->dia;
         $data_1[] = $row->grantotal;
     }
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar(75, '#44AC37');
     $bar_1->key('Monto', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Ventas de en el mes ' . $mes . '/' . $anio, '{font-size: 16px; color:##00264A}');
         $g->data_sets[] = $bar_1;
         $g->x_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_x_labels($fecha);
         $g->set_x_label_style(10, '#000000', 3, 1);
         $g->set_x_axis_steps(10);
         $g->set_x_legend('Dias', 14, '#004381');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Dia: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->y_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_y_legend('Ventas x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen ventas con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:50,代码来源:ventas.php

示例5: PostByUserFlash

 function PostByUserFlash()
 {
     $dataSet = $this->getPostByUser();
     $data = $dataSet['data'];
     $g = new graph();
     $g->title(' Posts by User last week ' . date("Y-m-d"), '{font-size: 16px;}');
     $max = 1;
     foreach ($dataSet['data'] as $k => $val) {
         if ($val > $max) {
             $max = $val;
         }
     }
     $max = intval($max / 4) * 4 + 4;
     $bar_red = new bar_3d(50, '#356aa0');
     $bar_red->key('posts', 10);
     $bar_red->data = $data;
     $bar_blue = new bar_3d(75, '#D54C78');
     $bar_blue->key('completed', 10);
     $bar_blue->data = $data;
     $g->data_sets[] = $bar_red;
     //$g->data_sets[] = $bar_blue;
     $g->set_x_axis_3d(12);
     $g->x_axis_colour('#909090', '#ADB5C7');
     $g->y_axis_colour('#909090', '#ADB5C7');
     $g->set_x_labels($dataSet['label']);
     $g->set_y_max($max);
     $g->y_label_steps(4);
     $g->set_y_legend('Processmaker', 12, '#736AFF');
     echo $g->render();
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:30,代码来源:class.pmosCommunity.php

示例6: gproducto

 function gproducto($anio = '', $departamento = '', $linea = '', $grupo = '')
 {
     $this->load->library('Graph');
     $this->load->library('calendar');
     //$this->calendar->generate();
     if (empty($anio) or empty($departamento) or empty($linea) or empty($grupo)) {
         return;
     }
     $fechai = $anio . '0101';
     $fechaf = $anio . '1231';
     $mSQL = "SELECT a.fecha,b.codigo,b.descrip AS nnombre,LEFT(b.descrip,20)AS nombre,e.depto,e.descrip,d.linea,d.descrip,b.grupo,b.descrip,c.nom_grup as ngrupo,\n    SUM(a.promedio*a.cantidad) AS costo,\n    SUM(a.venta) AS ventas,\n    SUM(a.venta)-SUM(a.promedio*a.cantidad) AS ganancias\n    FROM {$this->from} ";
     foreach ($this->join as $valor) {
         $mSQL .= "{$valor['2']} JOIN {$valor['0']} ON {$valor['1']}";
     }
     $mSQL .= " WHERE a.origen IN ('3I','3M') AND a.fecha>='{$fechai}' AND a.fecha<='{$fechaf}' AND e.depto='{$departamento}' AND d.linea='{$linea}' AND b.grupo='{$grupo}'\n    GROUP BY a.codigo ORDER BY ganancias DESC LIMIT 15";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->ganancias > $maxval) {
             $maxval = $row->ganancias;
         }
         $nombre[] = $row->nombre;
         $data_1[] = $row->ganancias;
     }
     $ngrupo = $row->ngrupo;
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar(75, '#639F45');
     $bar_1->key('Ganancias', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
         //$bar_1->links[]= site_url("ventas/gananciasproducto/index/$anio/$departamento/".$linea[$i]);
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Ganancias por producto de el grupo ' . $ngrupo . ' en el a&ntilde;o ' . $anio, '{font-size: 16px; color:#0F3054}');
         $g->data_sets[] = $bar_1;
         $g->set_x_axis_3d(5);
         $g->x_axis_colour('#909090', '#ADB5C7');
         $g->set_x_labels($nombre);
         $g->set_x_label_style(10, '#000000', 2, 1);
         $g->set_x_axis_steps(10);
         $g->set_x_legend('Productos', 14, '#004381');
         $g->y_axis_colour('#909090', '#ADB5C7');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Producto: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->set_y_legend('Ganancia x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen ganancias con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:59,代码来源:ganancias.php

示例7: gdiarias

 function gdiarias($anio = '', $producto = '', $mes = '')
 {
     $this->load->library('Graph');
     $this->lang->load('calendar');
     if (empty($anio)) {
         return;
     }
     $producto = radecode($producto);
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     //echo "fechai=".$fechai;
     //echo "fechaf=".$fechaf;
     $mSQL = "SELECT codigo, LEFT(descrip,20)AS nombre,DAYOFMONTH(a.fecha) as dia,\n    SUM(cantidad)AS cantidad,\n    SUM(importe)AS grantotal\n    FROM itscst  AS a\n    WHERE fecha>='{$fechai}' AND fecha<='{$fechaf}' AND codigo='{$producto}'\n    GROUP BY dia ORDER BY fecha";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->grantotal > $maxval) {
             $maxval = $row->grantotal;
         }
         $fecha[] = $row->dia;
         $nombre = $row->nombre;
         $data_1[] = $row->grantotal;
     }
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar(75, '#ADD8E6');
     $bar_1->key('Compras', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Compra de ' . $nombre . ' en el mes ' . $mes . '/' . $anio, '{font-size: 16px; color:##00264A}');
         $g->data_sets[] = $bar_1;
         $g->set_x_labels($fecha);
         $g->set_x_label_style(9, '#000000', 3, 1);
         $g->set_x_axis_steps(10);
         $g->x_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_x_legend('Dias', 16, '#004381');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Dia: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->y_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_y_legend('Compras x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen compras con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:55,代码来源:productos.php

示例8: min

	
	// set the X axis labels
	$g->set_x_labels( $labels );
	
	//$g->set_data( $data );
	//$g->bar_sketch( 50, 6, '#99FF00', '#7030A0', '% Complete', 10 );
	// add the bar object to the graph
	//
	$g->data_sets[] = $bar;
	
	$g->set_x_max(count($labels));
	$g->set_x_min(count($labels));
	
	$g->set_x_label_style( 11, '#A0A0A0', 2 );
	$g->set_y_label_style( 11, '#A0A0A0' );
	$g->x_axis_colour( '#A0A0A0', '#FFFFFF' );
	
	//$g->set_x_legend( 'Week 1', 12, '#A0A0A0' );
	$g->y_axis_colour( '#A0A0A0', '#FFFFFF' );
	
	
	$g->set_y_min( min($data) );
	$g->set_y_max( max($data) );
	$g->y_label_steps( 2 );
}
?>

<html>
	<head>
		<title><?=$title?></title>
		<link rel="stylesheet" rev="stylesheet" href="css/chart.css" type="text/css" media="screen"/>	
开发者ID:robertatakenaka,项目名称:Biodiversidade,代码行数:30,代码来源:chart.php

示例9: gmensuales

 function gmensuales($anio = '', $dia = '')
 {
     $this->load->library('Graph');
     //$this->lang->load('calendar');
     //if (empty($mes) or empty($dia)) return;
     $fechai = $anio . '0101';
     $fechaf = $anio . '1231';
     $mSQL = "SELECT fecha,IF(WEEKDAY(fecha)=0,'Lunes',IF(WEEKDAY(fecha)=1,'Martes',IF(WEEKDAY(fecha)=2,'Miercoles',IF(WEEKDAY(fecha)=3,'Jueves',IF(WEEKDAY(fecha)=4,'Viernes',IF(WEEKDAY(fecha)=5,'Sabado','Domingo'))))))AS tdia,\n    DATE_FORMAT(fecha,'%m')AS mes,SUM(monto)AS grantotal,SUM(impuesto)AS IVA,SUM(transac)as transacciones \n\t\tFROM est_fecha WHERE fecha>='{$fechai}' AND fecha<='{$fechaf}'AND WEEKDAY(fecha)='{$dia}'\n\t\tGROUP BY  MONTH(fecha)\n\t\tORDER BY fecha ASC";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->grantotal > $maxval) {
             $maxval = $row->grantotal;
         }
         $mes[] = $row->mes;
         $tdia = $row->tdia;
         $data_1[] = $row->grantotal;
     }
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar_outline(50, '#56AC8B', '#3F7E66');
     $bar_1->key('Monto', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Ventas en el a&ntilde;o ' . $anio . ' del dia ' . $tdia, '{font-size: 16px; color:##00264A}');
         $g->data_sets[] = $bar_1;
         $g->x_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_x_labels($mes);
         $g->set_x_label_style(10, '#000000', 3, 1);
         $g->set_x_axis_steps(10);
         $g->set_x_legend('Mes', 14, '#004381');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Mes: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->y_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_y_legend('Ventas x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen ventas con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:50,代码来源:dias.php

示例10: CasesByProcess

 function CasesByProcess()
 {
     $dataSet = $this->getCasesByProcess();
     $data = $dataSet['data'];
     //$series2 = $dataSet['series2'];
     $g = new graph();
     $g->title(' Cases by Process ', '{font-size: 14px;}');
     $bar_red = new bar_3d(50, '#3334AD');
     $bar_red->key('cases', 10);
     $bar_red->data = $data;
     $g->data_sets[] = $bar_red;
     $g->set_x_axis_3d(12);
     $g->x_axis_colour('#909090', '#ADB5C7');
     $g->y_axis_colour('#909090', '#ADB5C7');
     $g->set_x_labels($dataSet['label']);
     $g->set_y_max($dataSet['max']);
     $g->y_label_steps(6);
     echo $g->render();
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:19,代码来源:class.openFlash.php

示例11: graph

 function Chart3DBAR($LimiteMaximo = 100, $titulo = "", $titulo2 = "")
 {
     $data = $this->mValues;
     $label = $this->mLabels;
     $g = new graph();
     $g->title($this->mTitle, '{font-size:16px; color: #FFFFFF; margin: 5px; background-color: #505050; padding:5px; padding-left: 20px; padding-right: 20px;}');
     //$g->set_data( $data_1 );
     //$g->bar_3D( 75, '#D54C78', '2006', 10 );
     //$g->set_data( $data_2 );
     //$g->bar_3D( 75, '#3334AD', '2007', 10 );
     //Crea el Bar Blue
     $bar_blue = new bar_3d(75, '#3334AD');
     $bar_blue->key($titulo, 10);
     $bar_blue->data = $this->mValues;
     $g->data_sets[] = $bar_blue;
     if (is_array($this->mValues2)) {
         $bar_blue2 = new bar_3d(75, '#ff0000');
         $bar_blue2->key($titulo2, 10);
         $bar_blue2->data = $this->mValues2;
         $g->data_sets[] = $bar_blue2;
     }
     $g->set_x_axis_3d(12);
     $g->x_axis_colour('#909090', '#ADB5C7');
     $g->y_axis_colour('#909090', '#ADB5C7');
     $g->set_x_labels($this->mLabels);
     $g->set_y_max($LimiteMaximo);
     $g->y_label_steps(5);
     //$g->set_y_legend( 'Open Flash Chart', 12, '#736AFF' );
     $x = $g->render();
     return $this->setWriteFile($x);
 }
开发者ID:Cywaithaka,项目名称:S.A.F.E.-Open-Source-Microfinance-Suite,代码行数:31,代码来源:core.html.inc.php

示例12: gdiarias

 function gdiarias($anio = '', $concep = '', $mes = '')
 {
     $this->load->library('Graph');
     $this->lang->load('calendar');
     if (empty($anio) or empty($concep)) {
         return;
     }
     $fechai = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '01';
     $fechaf = $anio . str_pad($mes, 2, "0", STR_PAD_LEFT) . '31';
     $mSQL = "SELECT a.fecha,a.concep,SUM(a.monto)AS grantotal,b.nombre,DATE_FORMAT(fecha,'%d') AS dia\n\t\tFROM est_pago  as a JOIN banc as b ON a.concep=b.codbanc\n\t\tWHERE fecha>='{$fechai}' AND fecha<='{$fechaf}' AND a.concep='{$concep}'\n\t\tGROUP BY fecha ORDER BY fecha ASC";
     //echo $mSQL;
     $maxval = 0;
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         if ($row->grantotal > $maxval) {
             $maxval = $row->grantotal;
         }
         $dia[] = $row->dia;
         $data_1[] = $row->grantotal;
     }
     $om = 1;
     while ($maxval / $om > 100) {
         $om = $om * 10;
     }
     $bar_1 = new bar(55, '#07A8E7');
     $bar_1->key('Monto', 10);
     for ($i = 0; $i < count($data_1); $i++) {
         $bar_1->add_data_tip($data_1[$i] / $om, graph::esc(number_format($data_1[$i], 2, ',', '.')));
     }
     $g = new graph();
     $g->set_is_decimal_separator_comma(1);
     if ($maxval > 0) {
         $g->title('Ventas de el' . $mes . '/' . $anio, 'concep de pago' . $concep, '{font-size: 16px; color:##00264A}');
         $g->data_sets[] = $bar_1;
         $g->x_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_x_labels($dia);
         $g->set_x_label_style(10, '#000000', 3, 1);
         $g->set_x_axis_steps(10);
         $g->set_x_legend('Dias', 14, '#004381');
         $g->bg_colour = '#FFFFFF';
         $g->set_tool_tip('#key#<br>Dia: #x_label# <br>Monto: #tip#');
         $g->set_y_max(ceil($maxval / $om));
         $g->y_label_steps(5);
         $g->y_axis_colour('#A6A6A6', '#ADB5C7');
         $g->set_y_legend('Ventas x ' . number_format($om, 0, '', '.') . ' (Bs)', 16, '#004381');
     } else {
         $g->title('No existen ventas con los datos seleccionados', '{font-size:18px; color: #d01f3c}');
     }
     $g->bg_colour = '#FFFFFF';
     echo utf8_encode($g->render());
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:51,代码来源:bancos.php

示例13: graph

#$g->y_label_steps( 10 );
$g->set_width(650);
$g->set_height(400);
$g->set_output_type('js');
$ofc = $g->render();
/****************** bar de la catégorie sur l'année */
$g = new graph();
$g->title("{$cat_name}", '{font-size:20px; color: #bcd6ff; margin:10px;}');
$color = $oCat->getColor($cat_id);
$bar = new bar_glass(55, "{$color}", "{$color}");
$bar->data = $cat_annee;
$g->data_sets[] = $bar;
// label the X axis (10 labels for 10 bars):
$g->set_x_labels(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October'));
// colour the chart to make it pretty:
$g->x_axis_colour('#909090', '#D2D2FB');
$g->y_axis_colour('#909090', '#D2D2FB');
$g->set_y_min(0);
$g->set_y_max(max_tab($cat_annee));
$g->y_label_steps(6);
$g->set_y_legend('Open Flash Chart', 12, '#736AFF');
$g->set_width(650);
$g->set_height(400);
$g->set_output_type('js');
$ofc3 = $g->render();
/***********************************/
/************* Camembert sur l'année de toutes les catégories ***************************/
$pie = new graph();
//
// PIE chart, 60% alpha
//
开发者ID:relisher,项目名称:logiciel_de_compte,代码行数:31,代码来源:statsCompte.php

示例14: date

$max = 0;
for ($i = -4; $i < 1; $i++) {
    $date = date('Y-m-d', strtotime($i . ' days'));
    if ($i == 0) {
        $daysRow[] = t('Today');
    } else {
        $daysRow[] = strftime('%a', strtotime($i . ' days'));
    }
    $total = PageStatistics::getTotalPageViewsForOthers($u, $date);
    $viewsArray[] = $total;
    if ($total > $max) {
        $max = $total;
    }
}
$g = new graph();
$g->set_title('&nbsp;', '{color: #ffffff}');
$g->set_data($viewsArray);
$g->bg_colour = '#ffffff';
$g->set_inner_background('#ffffff', "#cccccc", 90);
// we add the 3 line types and key labels
$g->line_dot(3, 5, '#4C85BB', false, 10);
$g->set_x_labels($daysRow);
$g->set_x_label_style(10, '#ababab', 0, 2);
$g->x_axis_colour('#333333', '#bebebe');
$g->y_axis_colour('#333333', '#bebebe');
$g->set_y_max($max);
$g->num_decimals = 0;
$g->is_fixed_num_decimals_forced = true;
$g->y_label_steps(5);
$g->set_y_legend(t('Views'), 12, '#333333');
echo $g->render();
开发者ID:homer6,项目名称:concrete5-mirror,代码行数:31,代码来源:chart_handler.php

示例15: return_ofc_data

function return_ofc_data($styles)
{
    global $cms, $ps;
    $ofc = $cms->input['ofc'];
    $data = array();
    $data_avg = array();
    $avg = 0;
    $interval = 1000;
    $maxlimit = 1000;
    $minlimit = 0;
    $max = 21;
    $field = $ofc == 'skill' ? 'dayskill' : $ofc;
    if (!in_array($field, array('skill', 'kills', 'onlinetime'))) {
        $field = 'dayskill';
    }
    $plrid = $cms->input['id'];
    $ps->db->query("SELECT statdate,{$field} FROM {$ps->t_plr_data} WHERE plrid=" . $ps->db->escape($plrid, true) . " ORDER BY statdate DESC LIMIT {$max}");
    $i = 1;
    while (list($statdate, $skill) = $ps->db->fetch_row(0)) {
        $skill = round($skill);
        $sum += $skill;
        $data[] = $skill;
        $labels[] = $statdate;
    }
    if ($data) {
        $data = array_reverse($data);
        $labels = array_reverse($labels);
        $avg = $sum / count($data);
        $data_avg[] = $avg;
        $data_avg = array_pad($data_avg, count($data) - 1, 'null');
        // yes, 'null' is a string
        $data_avg[] = $avg;
        $minlimit = floor(min($data) / $interval) * $interval;
        $maxlimit = ceil(max($data) / $interval) * $interval;
    }
    include_once PS_ROOTDIR . '/includes/ofc/open-flash-chart.php';
    $g = new graph();
    $g->bg_colour = $styles->val('flash.plrskill.bgcolor', 'flash.bgcolor');
    $g->title($styles->val('flash.plrskill.title'), '{' . $styles->val('flash.plrskill.title.style', 'font-size: 12px', true) . '}');
    $g->set_data($data_avg);
    $g->set_data($data);
    $lines = $styles->attr('flash.plrskill.lines.line');
    $g->line(coalesce($lines[0]['width'], 1), coalesce($lines[0]['color'], '#9999ee'), coalesce($lines[0]['key'], $cms->trans('Average')), coalesce($lines[0]['key_size'], $styles->val('flash.plrskill.lines.key_size'), 9));
    $g->line(coalesce($lines[1]['width'], 1), coalesce($lines[1]['color'], '#9999ee'), coalesce($lines[1]['key'], $cms->trans('Skill')), coalesce($lines[1]['key_size'], $styles->val('flash.plrskill.lines.key_size'), 9));
    // label each point with its value
    $g->set_x_labels($labels);
    //	$g->set_x_axis_steps(count($labels) / 3 + 1);
    //	$g->set_x_tick_size(1);
    //	$g->set_x_label_style( 10, '0x000000', 0, 2 );
    //	$g->set_x_label_style('none');
    $g->set_x_label_style(8, '#000000', 2);
    $g->set_inner_background(coalesce($styles->val('flash.plrskill.bg_inner1', 'flash.bg_inner1'), '#E3F0FD'), coalesce($styles->val('flash.plrskill.bg_inner2', 'flash.bg_inner2'), '#CBD7E6'), coalesce($styles->val('flash.plrskill.bg_inner_angle', 'flash.bg_inner_angle'), 90));
    $g->x_axis_colour('#eeeeee', '#eeeeee');
    $g->y_axis_colour('#eeeeee', '#eeeeee');
    //	$g->set_x_offset( false );
    // set the Y max
    $g->set_y_max($maxlimit);
    $g->set_y_min($minlimit);
    // label every 20 (0,20,40,60)
    //	$g->x_label_steps( 2 );
    // display the data
    print $g->render();
}
开发者ID:Nerus87,项目名称:PsychoStats,代码行数:63,代码来源:player.php


注:本文中的graph::x_axis_colour方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。