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


PHP LinePlot::SetWeight方法代码示例

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


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

示例1: lineChart

 public static function lineChart($data1, $data2, $legends)
 {
     $graph = new Graph(600, 400);
     $graph->SetScale('intlin');
     $graph->SetShadow();
     $graph->SetMargin(40, 20, 20, 40);
     //        $graph->title->Set('Calls per operator (June,July)');
     //        $graph->subtitle->Set('(March 12, 2008)');
     //        $graph->xaxis->title->Set('Operator');
     //        $graph->yaxis->title->Set('# of calls');
     $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->xaxis->SetTickLabels($legends);
     $lineplot = new LinePlot($data1);
     $lineplot->SetWeight(4);
     // Two pixel wide
     // Add the plot to the graph
     $graph->Add($lineplot);
     // Create the second data series
     $lineplot2 = new LinePlot($data2);
     $lineplot2->SetWeight(4);
     // Two pixel wide
     $graph->Add($lineplot2);
     $lineplot->SetLegend("This Year");
     $lineplot2->SetLegend("Last Year");
     $graph->legend->SetLayout(LEGEND_HOR);
     $graph->legend->Pos(0.4, 0.95, "center", "bottom");
     return $graph->Stroke('../graph/compareLineChart.png');
 }
开发者ID:RushanGajanayake,项目名称:ACTA_Project,代码行数:29,代码来源:graphs.php

示例2: graficofecha

 public function graficofecha($gestion)
 {
     if (Conectar::con()) {
         //$gestion='2013';
         $objetoanalisis = new classAnalisis();
         $anio = $gestion;
         for ($i = 0; $i < 12; $i++) {
             $dat[] = $objetoanalisis->ventamensual($anio, $i);
         }
         $datos = $dat;
         //$datos =array('1','4','3','3','5');
         $grafico = new Graph(400, 300, "auto");
         $grafico->SetScale("textlin");
         $grafico->title->Set("Resumen de ventas por gestion");
         $grafico->xaxis->title->Set("");
         $grafico->yaxis->title->Set("");
         // Un gradiente Horizontal de rojo a azul
         // 25 pixeles de ancho para cada barra
         $lineplot = new LinePlot($datos);
         $lineplot->SetColor("green");
         $lineplot->SetWeight(2);
         $grafico->Add($lineplot);
         return $grafico->Stroke();
     }
 }
开发者ID:jaironman3008,项目名称:mercadomundial,代码行数:25,代码来源:classgrafico.php

示例3: LineGraph

function LineGraph($w, $h, $title, $data1, $data2, $datax, $output)
{
    // Create the graph. These two calls are always required
    $graph = new Graph($w, $h, "auto");
    $graph->SetScale("textlin");
    $graph->SetMarginColor('white');
    $graph->SetFrame(true);
    // Adjust the margin
    $graph->img->SetMargin(40, 100, 20, 40);
    $graph->SetShadow(false);
    // Create the linear plot
    $lineplot = new LinePlot($data1);
    $lineplot->SetWeight(2);
    $lineplot->SetColor("blue");
    $lineplot->mark->SetType(MARK_DIAMOND);
    $lineplot->mark->SetWidth(5);
    $lineplot->mark->SetFillColor('blue');
    $lineplot->value->SetMargin(-20);
    $lineplot->value->show();
    $lineplot->value->SetColor('blue');
    $lineplot->value->SetFormat('%0.0f');
    $lineplot->SetLegend($_SESSION[Tahun1]);
    $lineplot2 = new LinePlot($data2);
    $lineplot2->SetColor("green");
    $lineplot2->SetWeight(2);
    $lineplot2->mark->SetType(MARK_FILLEDCIRCLE);
    $lineplot2->mark->SetWidth(3);
    $lineplot2->mark->SetFillColor('green');
    $lineplot2->value->show();
    $lineplot2->value->SetColor('darkgreen');
    $lineplot2->value->SetFormat('%0.0f');
    $lineplot2->SetLegend($_SESSION[Tahun2]);
    // Add the plot to the graph
    $graph->Add($lineplot);
    $graph->xaxis->SetTickLabels($datax);
    $graph->title->Set($title);
    $graph->xaxis->title->Set("");
    $graph->yaxis->title->Set("");
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->Add($lineplot2);
    $graph->legend->SetShadow(false);
    $graph->legend->SetFillColor('white');
    $graph->legend->SetPos(0.01, 0.88, 'right', 'center');
    // Display the graph
    $graph->Stroke($output);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:48,代码来源:pmblap.aplikan.cetak.php

示例4: buildGraph

 /**
  * @return Chart
  */
 public function buildGraph()
 {
     $graph = new Chart($this->width, $this->height);
     $graph->SetScale("datlin");
     $graph->title->Set($this->title);
     $graph->subtitle->Set($this->description);
     $colors = $graph->getThemedColors();
     $graph->xaxis->SetTickLabels($this->burndown_data->getHumanReadableDates());
     $remaining_effort = new LinePlot($this->burndown_data->getRemainingEffort());
     $remaining_effort->SetColor($colors[1] . ':0.7');
     $remaining_effort->SetWeight(2);
     $remaining_effort->SetLegend('Remaining effort');
     $remaining_effort->mark->SetType(MARK_FILLEDCIRCLE);
     $remaining_effort->mark->SetColor($colors[1] . ':0.7');
     $remaining_effort->mark->SetFillColor($colors[1]);
     $remaining_effort->mark->SetSize(3);
     $graph->Add($remaining_effort);
     $ideal_burndown = new LinePlot($this->burndown_data->getIdealEffort());
     $ideal_burndown->SetColor($colors[0] . ':1.25');
     $ideal_burndown->SetLegend('Ideal Burndown');
     $graph->Add($ideal_burndown);
     return $graph;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:26,代码来源:BurndownView.class.php

示例5: Graph

}
// Create the graph. These two calls are always required
$graph = new Graph($xsize, $ysize, "auto", 30);
$graph->SetScale("textlin");
$graph->SetMarginColor("{$margincolour}");
$graph->yaxis->scale->SetGrace(10);
$graph->SetShadow();
$graph->SetMargin($lm, $rm, $tm, $bm);
// Create a line plot
$lplot = new LinePlot($datay);
$lplot2 = new LinePlot($datay2);
// Adjust colours
$lplot->SetColor("{$temp_col_max}");
$lplot->SetWeight(2);
$lplot2->SetColor("{$temp_col_min}");
$lplot2->SetWeight(2);
//Add plots
$graph->Add($lplot);
$graph->Add($lplot2);
// Setup the titles
$graph->title->Set("{$txt_temp} {$txt_31d} ({$temp_unit})");
$graph->title->SetColor("{$textcolour}");
$graph->title->SetFont(FF_ARIAL, FS_BOLD, 10);
//x-axis
$graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 8);
$graph->xaxis->title->Set("{$txt_date}");
$graph->xaxis->title->SetColor("{$xtextcolour}");
$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetTextLabelInterval(2);
$graph->xaxis->SetPos("min");
$graph->xaxis->SetColor("{$xtextcolour}");
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:month_hilo_temp.php

示例6: Graph

$graph = new Graph(500, 300);
$graph->SetScale("loglog");
$graph->SetY2Scale("lin");
$graph->y2axis->SetColor("blue", "blue");
$graph->img->SetMargin(50, 70, 40, 50);
$graph->title->Set("Geoelektrik");
$graph->xaxis->title->Set("Auslage ab/2 [m]");
$graph->yaxis->title->Set("rho_s [Ohm m]");
$graph->y2axis->title->Set("mn/2 [m]");
$graph->y2axis->title->SetColor("blue");
$graph->y2axis->SetTitleMargin(35);
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
$graph->xgrid->Show(true, true);
$graph->ygrid->Show(true, true);
// Create the linear plot
$lineplot = new LinePlot($rhos, $ab2);
$lineplot->SetWeight(1);
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetWidth(2);
// Create scatter plot
$scplot = new ScatterPlot($mn2, $ab2);
$scplot->mark->SetType(MARK_FILLEDCIRCLE);
$scplot->mark->SetColor("blue");
$scplot->mark->SetWidth(2);
// Add plots to the graph
$graph->AddY2($scplot);
$graph->Add($lineplot);
// Display the graph
$graph->Stroke();
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:loglogex1.php

示例7: array

<?php

include "../jpgraph.php";
include "../jpgraph_line.php";
$ydata = array(12, 17, 22, 19, 5, 15);
$graph = new Graph(270, 170);
$graph->SetMargin(30, 90, 30, 30);
$graph->SetScale("textlin");
$graph->img->SetAngle(90);
$graph->img->SetCenter(floor(270 / 2), floor(170 / 2));
$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);
// Output graph
$graph->Stroke();
?>


开发者ID:Ethennoob,项目名称:Web,代码行数:18,代码来源:rotex4.php

示例8: LinePlot

$lineplot->SetLegend('Traffic total');
$lineplot->SetColor('#d5d5d5');
$lineplot->SetFillColor('#d5d5d5@0.5');
// $lineplot2 = new LinePlot($tot_data_inv, $ticks);
// $lineplot2->SetColor("#d5d5d5");
// $lineplot2->SetFillColor("#d5d5d5@0.5");
$lineplot_in = new LinePlot($in_data, $ticks);
$lineplot_in->SetLegend('Traffic In');
$lineplot_in->SetColor('darkgreen');
$lineplot_in->SetFillColor('lightgreen@0.4');
$lineplot_in->SetWeight(1);
$lineplot_out = new LinePlot($out_data_inv, $ticks);
$lineplot_out->SetLegend('Traffic Out');
$lineplot_out->SetColor('darkblue');
$lineplot_out->SetFillColor('lightblue@0.4');
$lineplot_out->SetWeight(1);
if ($_GET['95th']) {
    $lineplot_95th = new LinePlot($per_data, $ticks);
    $lineplot_95th->SetColor('red');
}
if ($_GET['ave']) {
    $lineplot_ave = new LinePlot($ave_data, $ticks);
    $lineplot_ave->SetColor('red');
}
$graph->legend->SetLayout(LEGEND_HOR);
$graph->legend->Pos(0.52, 0.9, 'center');
$graph->Add($lineplot);
// $graph->Add($lineplot2);
$graph->Add($lineplot_in);
$graph->Add($lineplot_out);
if ($_GET['95th']) {
开发者ID:Rosiak,项目名称:librenms,代码行数:31,代码来源:billing-graph.php

示例9: Create


//.........这里部分代码省略.........
         $this->graph_margin[0] = $GRAPH_MARGINS['left'] + $this->graph_yaxis_size * $axes->GetAxesNumber();
         $this->graph_margin[2] = $GRAPH_MARGINS['right'];
     }
     if ($hide_x) {
         $this->graph_margin[1] = 0;
         $this->graph_margin[3] = 1;
         $this->graph->xaxis->HideLabels();
     } else {
         $this->graph_margin[1] = $GRAPH_MARGINS['top'];
         $this->graph_margin[3] = $GRAPH_MARGINS['bottom'];
         $title = $this->GenerateTitle($data, $spec);
         $this->graph->title->Set($title);
         $this->graph->xaxis->SetPos("min");
         //$this->graph->xaxis->SetLabelAngle(0);
         $this->graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8);
         //$this->graph->xaxis->scale->SetTimeAlign(MINADJ_15);
         // We can use SetLabelFormatCallback for higher control
         //$this->graph->yaxis->SetLabelFormat('%0.5g');
         //$this->graph->SetYDeltaDist($this->graph_yaxis_size);
     }
     $this->graph->img->SetMargin($this->graph_margin[0], $this->graph_margin[2], $this->graph_margin[1], $this->graph_margin[3]);
     $this->graph->xaxis->SetLabelMargin(13);
     foreach ($axes as $axis_i => $axis) {
         $empty_axis = true;
         if (intval($this->plot_mode) === DRAW::PLOT_STANDARD) {
             foreach ($axis as $i => $plot_data) {
                 $plot = new LinePlot($plot_data[1], $plot_data[0]);
                 $color = $axis->GetChannelColor($i);
                 if ($color) {
                     $plot->SetColor($color);
                 }
                 $weight = $axis->GetChannelProperty($i, "weight");
                 if ($weight) {
                     $plot->SetWeight($weight);
                 }
                 if ($spec['marks']) {
                     $prop = $axis->GetChannelProperty($i, "mark_type");
                     if ($prop) {
                         $plot->mark->SetType($prop);
                     }
                     $prop = $axis->GetChannelProperty($i, "mark_size");
                     if ($prop) {
                         $plot->mark->SetSize($prop);
                     }
                     $prop = $axis->GetChannelProperty($i, "mark_fill");
                     if ($prop) {
                         $plot->mark->SetFillColor($prop);
                     }
                 }
                 $this->graph->AddY($axis_i, $plot);
                 $empty_axis = false;
             }
         } else {
             if (intval($this->plot_mode) === DRAW::PLOT_CUSTOM) {
                 foreach ($data as $info) {
                     $acc_lineplot_array = array();
                     $lineplot_array = array();
                     $items = $info['items'];
                     $time = $info['time'];
                     $values = $info['values'];
                     foreach ($axis as $i => $plot_data) {
                         $plot = new LinePlot($plot_data[1], $plot_data[0]);
                         $color = $axis->GetChannelColor($i);
                         if ($color) {
                             $plot->SetColor($color);
                         }
开发者ID:nicolaisi,项目名称:adei-cube,代码行数:67,代码来源:draw.php

示例10: LinePlot

$graph->title->Set('Example of Function plot');
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)");
$graph->subtitle->SetFont(FF_FONT1, FS_NORMAL);
$graph->xgrid->Show();
$graph->yaxis->SetPos(0);
$graph->yaxis->SetWeight(2);
$graph->yaxis->HideZeroLabel();
$graph->yaxis->SetFont(FF_FONT1, FS_BOLD);
$graph->yaxis->SetColor('black', 'darkblue');
$graph->yaxis->HideTicks(true, false);
$graph->yaxis->HideFirstLastLabel();
$graph->xaxis->SetWeight(2);
$graph->xaxis->HideZeroLabel();
$graph->xaxis->HideFirstLastLabel();
$graph->xaxis->SetFont(FF_FONT1, FS_BOLD);
$graph->xaxis->SetColor('black', 'darkblue');
$lp1 = new LinePlot($ydata, $xdata);
$lp1->SetColor('blue');
$lp1->SetWeight(2);
$lp2 = new LinePlot($y2data, $x2data);
list($xm, $ym) = $lp2->Max();
$lp2->SetColor('red');
$lp2->SetWeight(2);
$graph->Add($lp1);
$graph->Add($lp2);
$graph->Stroke();
?>


开发者ID:centaurustech,项目名称:BenFund,代码行数:28,代码来源:funcex1.php

示例11: courbe_today

function courbe_today($domain)
{
    $tpl = new templates();
    $q = new mysql();
    $dansguardian_events = "dansguardian_events_" . date('Ym');
    $sql = "SELECT COUNT( ID ) AS tcount, sitename, DATE_FORMAT( zdate, '%H' ) AS thour , DATE_FORMAT( zdate, '%Y-%m-%d' ) AS tday\nFROM {$dansguardian_events}\nWHERE sitename = '{$domain}'\nGROUP BY thour , tday\nHAVING tday = DATE_FORMAT( NOW( ) , '%Y-%m-%d' )\nORDER BY thour";
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $GLOBALS["stats-array-{$domain}"][] = "<tr>\n\t<td style='font-size:12px;font-weight:bold' nowrap>{$ligne["thour"]}:00</td>\n\t<td style='font-size:12px;font-weight:bold' nowrap>{$ligne["tcount"]} hits</td>\n\t</tr>\n\t";
        $ydata[] = $ligne["tcount"];
        $xdata[] = $ligne["hour"];
    }
    $f_name = "day-squid-{$domain}.png";
    $fileName = "ressources/logs/{$f_name}";
    if (is_file($fileName)) {
        if (file_get_time_min($fileName) < 120) {
            return $fileName;
        }
    }
    $title = "{$domain} " . $tpl->_ENGINE_parse_body('{today}');
    @unlink($fileName);
    $width = 500;
    $height = 200;
    if ($zoom) {
        $width = 720;
        $height = 400;
    }
    JpGraphError::SetImageFlag(false);
    $graph = new Graph($width, $height);
    $graph->SetScale('textlin');
    $graph->title->Set($title);
    $graph->title->SetColor('white');
    $graph->xaxis->title->Set('hours');
    $graph->xaxis->SetTickLabels($xdata);
    $graph->yaxis->title->Set('(hits number)');
    $graph->yaxis->scale->SetGrace(10);
    $graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN);
    $graph->SetPlotGradient('black', 'darkred:0.8', 2);
    $graph->SetMargin(55, 20, 60, 20);
    //$graph->img->SetMargin(50,30,30,100);
    $graph->xaxis->SetColor('lightgray');
    $graph->yaxis->SetColor('lightgray');
    $graph->xgrid->Show();
    $lineplot = new LinePlot($ydata);
    $lineplot->SetWeight(2);
    $lineplot->SetColor('orange:0.9');
    $lineplot->SetFillColor('white@0.7');
    $lineplot->SetFillFromYMin();
    $lineplot->SetWeight(2);
    $lineplot->SetFilled(true);
    $lineplot->SetFillFromYMin(true);
    $graph->Add($lineplot);
    JpGraphError::SetImageFlag(false);
    try {
        $gdImgHandler = $graph->Stroke(_IMG_HANDLER);
    } catch (JpGraphException $e) {
        // .. do necessary cleanup
        // Send back error message
        // $e->Stroke();
    }
    $graph->img->Stream($fileName);
    return $fileName;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:63,代码来源:squid.website.stats.php

示例12: curve_chart

 public function curve_chart($total, $previousyear, $previousmonth, $xdata, $title)
 {
     require_once 'Examples/jpgraph/jpgraph.php';
     require_once 'Examples/jpgraph/jpgraph_line.php';
     require_once 'Examples/jpgraph/jpgraph_bar.php';
     $datax = array('1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月');
     // Create the graph.
     $graph = new Graph(1000, 400);
     $graph->SetScale("textlin");
     $graph->SetMarginColor('white');
     $graph->title->SetFont(FF_SIMSUN, FS_BOLD);
     // 设置中文字体
     $graph->subtitle->SetFont(FF_SIMSUN);
     $graph->subsubtitle->SetFont(FF_SIMSUN);
     // Adjust the margin slightly so that we use the
     // entire area (since we don't use a frame)
     $graph->SetMargin(20, 1, 20, 90);
     // Box around plotarea
     $graph->SetBox();
     // No frame around the image
     $graph->SetFrame(false);
     // Setup the tab title
     $graph->tabtitle->Set($title);
     $graph->tabtitle->SetFont(FF_SIMSUN, FS_BOLD, 10);
     // Setup the X and Y grid
     $graph->ygrid->SetFill(true, '#DDDDDD@0.5', '#BBBBBB@0.5');
     $graph->ygrid->SetLineStyle('dashed');
     $graph->ygrid->SetColor('gray');
     $graph->xgrid->Show();
     $graph->xgrid->SetLineStyle('dashed');
     $graph->xgrid->SetColor('gray');
     $graph->xaxis->SetLabelAngle(35);
     $graph->legend->SetFont(FF_SIMSUN, FS_NORMAL);
     $graph->legend->SetPos(0.01, 0.01);
     // Setup month as labels on the X-axis
     $graph->xaxis->SetTickLabels($xdata);
     $graph->xaxis->SetFont(FF_SIMSUN, FS_NORMAL, 8);
     // Create the linear error plot
     $l1plot = new LinePlot($previousyear);
     $l1plot->SetColor('red');
     $l1plot->SetWeight(2);
     $l1plot->SetLegend('环比');
     // Create the linear error plot
     $l2plot = new LinePlot($previousmonth);
     $l2plot->SetColor('yellow');
     $l2plot->SetWeight(2);
     $l2plot->SetLegend('同比');
     // Create the bar plot
     $bplot = new LinePlot($total);
     $bplot->SetColor('orange');
     $bplot->SetWeight(2);
     $bplot->SetLegend('总量');
     // Add the plots to t'he graph
     $graph->Add($bplot);
     $graph->Add($l1plot);
     $graph->Add($l2plot);
     //		$graph->title->Set('Adding a line plot to a bar graph v1');
     //		$graph->xaxis->title->Set('X-title');
     $graph->yaxis->title->Set('月份');
     $graph->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
     //	$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
     //	$graph->xaxis->SetTickLabels($datax);
     //$graph->xaxis->SetTextTickInterval(2);
     // Display the graph
     $graph->Stroke();
 }
开发者ID:magiclake,项目名称:chaowei,代码行数:67,代码来源:statistic_new.php

示例13: CourbeParHeure

function CourbeParHeure($zoom = false)
{
    $day = $_GET["DAY"];
    if ($day == null) {
        $day = date('Y-m-d');
    }
    @mkdir($_GET["BASEPATH"], 0755, true);
    $f_name = "day-global-{$day}.png";
    if ($zoom) {
        $f_name = "day-global-{$day}-zoom.png";
    }
    $fileName = "{$_GET["BASEPATH"]}/{$f_name}";
    if (is_file($fileName)) {
        if (file_get_time_min($fileName) < 20) {
            return "{$_GET["IMGPATH"]}/{$f_name}";
        }
    }
    @unlink($fileName);
    $q = new mysql();
    $sql = "SELECT COUNT(ID) as tcount ,DATE_FORMAT(zDate,'%h') as thour \nFROM `mbx_con`  WHERE DATE_FORMAT(zDate,'%Y-%m-%d')='{$day}' GROUP BY thour ORDER BY thour";
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $ydata[] = $ligne["tcount"];
        $xdata[] = $ligne["thour"];
    }
    if (count($ydata) < 2) {
        $ydata[] = 1;
        $xdata[] = date('d');
    }
    $width = 500;
    $height = 200;
    if ($zoom) {
        $width = 720;
        $height = 400;
    }
    $graph = new Graph($width, $height);
    $graph->SetScale('textlin');
    $graph->title->Set("Connexions numbers {$day}");
    $graph->title->SetColor('white');
    $graph->xaxis->title->Set('hours');
    $graph->xaxis->SetTickLabels($xdata);
    $graph->yaxis->title->Set('(connexions)');
    $graph->SetBackgroundGradient('darkred:0.7', 'black', 2, BGRAD_MARGIN);
    $graph->SetPlotGradient('black', 'darkred:0.8', 2);
    $graph->xaxis->SetColor('lightgray');
    $graph->yaxis->SetColor('lightgray');
    $graph->xgrid->Show();
    $lineplot = new LinePlot($ydata);
    $lineplot->SetWeight(2);
    $lineplot->SetColor('orange:0.9');
    $lineplot->SetFillColor('white@0.7');
    $lineplot->SetFillFromYMin();
    $lineplot->SetWeight(2);
    $lineplot->SetFilled(true);
    $lineplot->SetFillFromYMin(true);
    $graph->Add($lineplot);
    $gdImgHandler = $graph->Stroke(_IMG_HANDLER);
    $graph->img->Stream($fileName);
    return "{$_GET["IMGPATH"]}/{$f_name}";
}
开发者ID:brucewu16899,项目名称:artica,代码行数:60,代码来源:imap.daily.statistics.php

示例14: BarPlot

    $b1plot = new BarPlot($cdiff);
    $b1plot->SetFillColor("red");
    $b1plot->SetLegend("Accum Difference");
    $b2plot = new BarPlot($obs);
    $b2plot->SetFillColor("blue");
    $b2plot->SetLegend("Obs Rain");
    $g = new GroupBarPlot(array($b1plot, $b2plot));
    $g->SetAlign("left");
}
// Create the linear plot
$lp1 = new LinePlot($aobs);
$lp1->SetLegend("Actual Accum");
$lp1->SetColor("blue");
$lp1->SetWeight(2);
if ($hasclimate && sizeof($cdiff) > 0) {
    $lp2 = new LinePlot($aclimate);
    $lp2->SetLegend("Climate Accum");
    $lp2->SetColor("red");
    $lp2->SetWeight(2);
    $z = new LinePlot($zeros);
    $z->SetWeight(2);
}
// Add the plot to the graph
$graph->Add($lp1);
if ($hasclimate && sizeof($cdiff) > 0) {
    $graph->Add($lp2);
    $graph->Add($g);
    $graph->Add($z);
}
// Display the graph
$graph->Stroke();
开发者ID:muthulatha,项目名称:iem,代码行数:31,代码来源:rainfall_plot.php

示例15: BarPlot

$barplot_in->SetFillColor('#' . $config['graph_colours']['greens'][0]);
$barplot_in->SetWeight(1);
$barplot_out = new BarPlot($out_data);
$barplot_out->SetLegend("Traffic Out");
$barplot_out->SetColor('#' . $config['graph_colours']['blues'][0]);
$barplot_out->SetFillColor('#' . $config['graph_colours']['blues'][1]);
$barplot_out->SetWeight(1);
if ($imgtype == "historical") {
    $barplot_over = new BarPlot($overuse_data);
    $barplot_over->SetLegend("Traffic Overusage");
    $barplot_over->SetColor('darkred');
    $barplot_over->SetFillColor('lightred@0.4');
    $barplot_over->SetWeight(1);
    $lineplot_allow = new LinePlot($allow_data);
    $lineplot_allow->SetLegend("Traffic Allowed");
    $lineplot_allow->SetColor('black');
    $lineplot_allow->SetWeight(1);
    $gbplot = new GroupBarPlot(array($barplot_in, $barplot_tot, $barplot_out, $barplot_over));
} else {
    $lineplot_allow = new LinePlot($ave_data);
    //$lineplot_allow->SetLegend("Average per ".$imgtype);
    $lineplot_allow->SetLegend("Average");
    $lineplot_allow->SetColor('black');
    $lineplot_allow->SetWeight(1);
    $gbplot = new GroupBarPlot(array($barplot_in, $barplot_tot, $barplot_out));
}
$graph->Add($gbplot);
$graph->Add($lineplot_allow);
// Display the graph
$graph->Stroke();
// EOF
开发者ID:Natolumin,项目名称:observium,代码行数:31,代码来源:bandwidth-graph.php


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