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


PHP Graph::SetBackgroundImageMix方法代码示例

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


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

示例1: strtotime

$bplot->SetShadow();
$bplot->value->SetFormat("%.1f%%");
$bplot->value->Show();
$day0 = strtotime(date("Y") . "-06-01");
$day1 = strtotime(date("Y") . "-09-15");
$day2 = strtotime(date("Y-m-d"));
$blue_start = ($day2 - $day0) / (60 * 60 * 24);
$blue_end = ($day2 - $day1) / (60 * 60 * 24);
if ($blue_start >= 0 xor $blue_end < 0) {
    //黄色
    $graph->SetBackgroundImage('/home/kouji/public_html/html/AutoTweet/image/denryoku_bg_new_y.png', BGIMG_FILLFRAME);
} else {
    //水色
    $graph->SetBackgroundImage('/home/kouji/public_html/html/AutoTweet/image/denryoku_bg_new_b.png', BGIMG_FILLFRAME);
}
$graph->SetBackgroundImageMix(100);
$graph->title->SetFont(FF_PGOTHIC, FS_NORMAL, 20);
$graph->title->Set("\n《大手電力会社 電力使用率》");
$z = date("H") % 3;
if ($z == 2) {
    $omimai = " 熊本地震の被災地の皆様に、心よりお見舞い申し上げます。\n";
} elseif ($z == 1) {
    $omimai = "東日本大震災の被災地の皆様に、心よりお見舞い申し上げます。\n";
} elseif ($z == 0) {
    $omimai = "鳥取県中部地震の被災地の皆様に、心よりお見舞い申し上げます。\n";
}
$omimai .= " 一日も早く、復興が出来ますように、お祈り申し上げます。\n";
$omimai .= "                           " . $data_time . "更新";
$graph->xaxis->title->Set($omimai);
$graph->xaxis->title->SetFont(FF_GOTHIC, FS_NORMAL, 10);
$graph->xaxis->title->SetMargin(-585);
开发者ID:mintwavio,项目名称:TanpopoWeather,代码行数:31,代码来源:Denryoku.php

示例2: floor

foreach ($humidity as $value) {
    $bucket_pos = floor($value / $range_interval);
    if ($bucket_pos >= $INTERVAL_COUNT) {
        $bucket_pos = $INTERVAL_COUNT - 1;
    }
    $bucket[$bucket_pos]++;
    //error_log("item=".$value."||bucket_pos=".$bucket_pos."||count=".$bucket[$bucket_pos]);
}
$humidity_plot = new BarPlot($bucket);
$humidity_plot->SetColor('dodgerblue');
$humidity_plot->SetWeight(2);
$humidity_plot->SetFillColor('dodgerblue');
$graph = new Graph($width, $height);
$graph->SetFrame(false);
$graph->SetBackgroundImage('background_v_40_60.png', BGIMG_FILLPLOT);
$graph->SetBackgroundImageMix(35);
$graph->SetMargin(60, 60, 40, 50);
$graph->SetMarginColor('white');
$graph->SetScale('textlin');
$graph->Add($humidity_plot);
$graph->ygrid->SetColor("azure3");
$graph->xaxis->SetLabelAngle(90);
$graph->xaxis->SetWeight(2);
$graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, $font_size - 3);
$graph->xaxis->SetTickLabels($tick_labels);
$graph->yaxis->SetWeight(2);
$graph->yaxis->SetColor('dodgerblue');
$graph->yaxis->SetFont(FF_ARIAL, FS_NORMAL, $font_size - 3);
$graph->yaxis->title->SetColor('dodgerblue');
$graph->yaxis->title->Set('Number of occurrences');
$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, $font_size);
开发者ID:Rockvole,项目名称:indoor-air-quality-dashboard,代码行数:31,代码来源:hist_dht22.php

示例3: genererCourbe

/**
 * Un tableau contenant les moyennes des eleves pour chaque sequences
 * 
 * @param type $moyennes = array()
 */
function genererCourbe($moyennes, $rang, $codeperiode = "S")
{
    try {
        # Donnees de la courbe
        $ydata = $moyennes;
        $ydata2 = $moyennes;
        /* for ($i = 1; $i <= 6; $i++) {
           $r = rand(0, 20);
           $ydata[] = $r;
           $ydata2[] = $r;
           } */
        /** Definition des label de l'axe x */
        if ($codeperiode === "T") {
            $datax = array("TRIM1", "TRIM2", "TRIM3");
        } else {
            $datax = array("seq 1", "seq 2", "seq 3", "seq 4", "seq 5", "seq 6");
        }
        # Creation du graph
        $graph = new Graph(350, 250, 'auto');
        $graph->SetMarginColor('white');
        # Definir le max et le min des valeur X
        $graph->SetScale('textlin', 0, 20);
        #$graph->xaxis->title->Set("Séquences");
        $graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 12);
        $graph->yaxis->title->Set("Moyennes");
        $graph->xaxis->SetTickLabels($datax);
        $graph->xaxis->title->SetFont(FF_ARIAL, FS_BOLD, 12);
        if ($codeperiode === "T") {
            $graph->xaxis->SetTitle("Trimestres", "middle");
        } else {
            $graph->xaxis->SetTitle("Séquences", "middle");
        }
        $graph->SetBackgroundGradient('white', 'lightblue', GRAD_HOR, BGRAD_PLOT);
        # Adjuster les margins (left, right, top, bottom)
        $graph->SetMargin(40, 5, 21, 45);
        # Box autour du plotarea
        $graph->SetBox();
        # Un cadre ou frame autour de l'image
        $graph->SetFrame(false);
        # Definir le titre tabulaire
        $graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 8);
        $graph->tabtitle->Set($_SESSION['anneeacademique']);
        # Definir le titre du graphe
        $graph->title->SetFont(FF_VERDANA, FS_BOLD, 8);
        $graph->title->SetAlign("right");
        if (count($ydata) > 1) {
            $prev = $ydata[count($ydata) - 2];
            if ($prev < $ydata[count($ydata) - 1]) {
                $graph->title->Set("Performance en hausse");
            } elseif ($prev == $ydata[count($ydata) - 1]) {
                $graph->title->Set("Performance constante");
            } else {
                $graph->title->Set("Performance en baisse");
            }
        }
        # Definir les grid X et Y
        $graph->ygrid->SetFill(true, '#BBBBBB@0.9', '#FFFFFF@0.9');
        //$graph->ygrid->SetLineStyle('dashed');
        //$graph->ygrid->SetColor('gray');
        //$graph->xgrid->SetLineStyle('dashed');
        $graph->xgrid->SetColor('gray');
        $graph->xgrid->Show();
        //$graph->ygrid->Show();
        #$graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_MARGIN);
        $graph->xaxis->SetFont(FF_ARIAL, FS_NORMAL, 8);
        $graph->xaxis->SetLabelAngle(0);
        # Creation d'une bar pot
        $bplot = new BarPlot($ydata);
        $bplot->SetWidth(0.9);
        $fcol = '#440000';
        $tcol = '#FF9090';
        $bplot->SetFillGradient($fcol, $tcol, GRAD_LEFT_REFLECTION);
        # Set line weigth to 0 so that there are no border around each bar
        $bplot->SetWeight(0);
        # Create filled line plot
        $lplot = new LinePlot($ydata2);
        $lplot->SetFillColor('skyblue@0.5');
        $lplot->SetStyle(1);
        $lplot->SetColor('navy@0.7');
        $lplot->SetBarCenter();
        $lplot->mark->SetType(MARK_SQUARE);
        $lplot->mark->SetColor('blue@0.5');
        $lplot->mark->SetFillColor('lightblue');
        $lplot->mark->SetSize(5);
        # Afficher les moyenne au dessus des barres
        $accbarplot = new AccBarPlot(array($bplot));
        $accbarplot->value->SetFormat("%.2f");
        $accbarplot->value->Show();
        $graph->Add($accbarplot);
        $graph->SetBackgroundImageMix(50);
        # Definir un fond d'ecran pour l'image
        $background = SITE_ROOT . "public/photos/eleves/" . $rang['PHOTOEL'];
        if (!empty($rang['PHOTOEL']) && file_exists(ROOT . DS . "public" . DS . "photos" . DS . "eleves" . DS . $rang['PHOTOEL'])) {
            $graph->SetBackgroundImage($background, BGIMG_FILLPLOT);
            # $icon = new IconPlot($background, 25, 25, 0.8, 50);
//.........这里部分代码省略.........
开发者ID:jpainam,项目名称:locan,代码行数:101,代码来源:Functions2.php


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