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


PHP LinePlot::SetFillFromYMin方法代码示例

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


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

示例1: 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

示例2: LinePlot

// Now set the tic positions
$graph->xaxis->SetMajTickPositions($tickPositions, $tickLabels);
// Use Times font
$graph->xaxis->SetFont(FF_TIMES, FS_NORMAL, 11);
$graph->yaxis->SetFont(FF_TIMES, FS_NORMAL, 9);
// Set colors for axis
$graph->xaxis->SetColor('lightgray');
$graph->yaxis->SetColor('lightgray');
// Add a X-grid
$graph->xgrid->Show();
// Show ticks outwards
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->xaxis->SetLabelMargin(8);
$graph->yaxis->SetTickSide(SIDE_LEFT);
// Setup a filled y-grid
//$graph->ygrid->SetFill(true,'darkgray:1.55@0.7','darkgray:1.6@0.7');
$graph->ygrid->SetStyle('dotted');
$graph->xgrid->SetStyle('dashed');
// Create the plot line
$p1 = new LinePlot($datay, $datax);
$p1->SetWeight(2);
$p1->SetColor('orange:0.9');
$p1->SetFillColor('white@0.7');
$p1->SetFillFromYMin();
$graph->Add($p1);
// Output graph
$graph->Stroke();
?>


开发者ID:trabisdementia,项目名称:xuups,代码行数:28,代码来源:manualtickex4.php

示例3: courbeparmois

function courbeparmois($zoom = false)
{
    $month = $_GET["MONTH"];
    @mkdir($_GET["BASEPATH"], 0755, true);
    $f_name = "day-global-{$month}.png";
    if ($zoom) {
        $f_name = "day-global-{$month}-zoom.png";
    }
    $fileName = "{$_GET["BASEPATH"]}/{$f_name}";
    if (is_file($fileName)) {
        if (file_get_time_min($fileName) < 120) {
            return "{$_GET["IMGPATH"]}/{$f_name}";
        }
    }
    @unlink($fileName);
    $q = new mysql();
    $sql = "SELECT SUM(emails) as tcount , DATE_FORMAT(DAY,'%d') as tday FROM `smtp_logs_day`  WHERE DATE_FORMAT(DAY,'%Y-%m')='{$_GET["MONTH"]}' GROUP BY tday ORDER BY tday";
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $ydata[] = $ligne["tcount"];
        $xdata[] = $ligne["DAY"];
    }
    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("Received Mails {$_GET["MONTH"]}");
    $graph->title->SetColor('white');
    $graph->xaxis->title->Set('days');
    $graph->xaxis->SetTickLabels($xdata);
    $graph->yaxis->title->Set('(emails 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);
    $gdImgHandler = $graph->Stroke(_IMG_HANDLER);
    $graph->img->Stream($fileName);
    return "{$_GET["IMGPATH"]}/{$f_name}";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:60,代码来源:smtp.daily.statistics.php

示例4: 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

示例5: courbe_month

function courbe_month()
{
    $tpl = new templates();
    $q = new mysql();
    $sql = "SELECT COUNT(ID) as tcount, DATE_FORMAT(zDate,'%d') as tday FROM fetchmail_events WHERE MONTH(zDate)=MONTH(NOW()) \nAND YEAR (zDate)=YEAR(NOW()) GROUP BY tday ORDER BY tday;";
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $ydata[] = $ligne["tcount"];
        $xdata[] = $ligne["tday"];
    }
    $f_name = "month-fetchmail.png";
    $fileName = "ressources/logs/{$f_name}";
    /*	if(is_file($fileName)){
    		if(file_get_time_min($fileName)<120){return $fileName;}
    	}*/
    @unlink($fileName);
    $title = "{$domain} " . $tpl->_ENGINE_parse_body('{this_month}');
    $YNAME = $tpl->_ENGINE_parse_body("{emails_number}");
    $XNAME = $tpl->_ENGINE_parse_body("{days}");
    $width = 500;
    $height = 200;
    $graph = new Graph($width, $height);
    try {
        $graph->img->SetColor("red@0.9");
        $graph->SetMarginColor('#FFFFFF');
        $graph->SetScale('textlin');
        $graph->title->Set($title);
        $graph->title->SetColor('#005447');
        $graph->xaxis->title->Set($XNAME);
        $graph->xaxis->SetTickLabels($xdata);
        $graph->yaxis->title->Set($YNAME);
        $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->xaxis->SetColor('black');
        $graph->yaxis->SetColor('black');
        $graph->xgrid->Show();
        $lineplot = new LinePlot($ydata);
        $lineplot->SetWeight(2);
        $lineplot->SetColor('#005447');
        $lineplot->SetFillColor('green@0.5');
        //$lineplot->SetFillColor('white@0.9');
        $lineplot->SetFillFromYMin();
        $lineplot->SetWeight(3);
        $lineplot->SetFilled(true);
        $lineplot->SetFillFromYMin(true);
        $graph->Add($lineplot);
        JpGraphError::SetImageFlag(false);
        $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,代码行数:58,代码来源:fetchmail.events.php


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