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


PHP LinePlot::SetCSIMTargets方法代码示例

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


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

示例1: LinePlot

$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30, 5, 25, 20);
// Setup the tab
$graph->tabtitle->Set(' Year 2003 ');
$graph->tabtitle->SetFont(FF_ARIAL, FS_BOLD, 13);
$graph->tabtitle->SetColor('darkred', '#E1E1FF');
// Enable X-grid as well
$graph->xgrid->Show();
// Use months as X-labels
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
// Create the plot
$p1 = new LinePlot($datay1);
$p1->SetColor("navy");
$p1->SetCSIMTargets(array('#1', '#2', '#3', '#4', '#5'));
// Use an image of favourite car as
$p1->mark->SetType(MARK_IMG, 'saab_95.jpg', 0.5);
//$p1->mark->SetType(MARK_SQUARE);
// Displayes value on top of marker image
$p1->value->SetFormat('%d mil');
$p1->value->Show();
$p1->value->SetColor('darkred');
$p1->value->SetFont(FF_ARIAL, FS_BOLD, 10);
// Increase the margin so that the value is printed avove tje
// img marker
$p1->value->SetMargin(14);
// Incent the X-scale so the first and last point doesn't
// fall on the edges
$p1->SetCenter();
$graph->Add($p1);
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:imgmarkercsimex1.php

示例2: array

$ydata = array(2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
$ydata2 = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$targ = array("#1", "#2", "#3", "#4", "#5", "#6", "#7", "#8", "#9", "#10");
$alt = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
// Create the graph.
$graph = new Graph(300, 200);
$graph->SetScale("textlin");
$graph->img->SetMargin(40, 20, 30, 40);
$graph->title->Set("CSIM example with bar and line");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Setup axis titles
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");
// Create the linear plot
$lineplot = new LinePlot($ydata);
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetWidth(5);
$lineplot->mark->SetColor('black');
$lineplot->mark->SetFillColor('red');
$lineplot->SetCSIMTargets($targ, $alt);
// Create line plot
$barplot = new barPlot($ydata2);
$barplot->SetCSIMTargets($targ, $alt);
// Add the plots to the graph
$graph->Add($lineplot);
$graph->Add($barplot);
$graph->StrokeCSIM();
?>


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

示例3: graficar_cantidades

function graficar_cantidades($eje_y, $x_label, $pareto, $titulo_eje_x, $titulo_eje_y, $title, $name)
{
    include "../jpgraph/src/jpgraph.php";
    include "../jpgraph/src/jpgraph_line.php";
    include "../jpgraph/src/jpgraph_bar.php";
    $graph = new Graph(820, 350);
    $graph->SetScale("textlin");
    $graph->SetMarginColor("#FFFFFF");
    $graph->img->SetMargin(80, 80, 60, 100);
    $graph->yaxis->SetTitleMargin(40);
    $graph->SetBackgroundImage("../imagenes/fondo.jpg", BGIMG_FILLFRAME);
    $graph->xaxis->SetLabelAngle(90);
    $graph->xaxis->SetTickLabels($x_label);
    $graph->legend->Pos(0.03, 0.3);
    $graph->title->SetColor("#000000");
    $graph->title->Set($title);
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->yaxis->title->Set($titulo_eje_y);
    $graph->xaxis->title->Set($titulo_eje_x);
    $graph->setcolor("#EEEEEE");
    $graph->setshadow("true", 3, "#aaaaaa");
    // Crear la gráfica de barras
    $bplot1 = new BarPlot($eje_y);
    $bplot1->SetWidth(0.3);
    $bplot1->SetYMin(0.02);
    $bplot1->SetFillColor("orange@0.2");
    $bplot1->SetShadow('darkgray');
    $bplot1->value->SetColor("darkred");
    $bplot1->value->Show();
    // Crear la gráfica de líneas
    $lplot = new LinePlot($pareto);
    $lplot->mark->SetType(MARK_FILLEDCIRCLE);
    $lplot->mark->SetFillColor("red");
    $lplot->mark->SetWidth(3);
    $lplot->SetColor("blue");
    $lplot->SetCSIMTargets($targ, $alt);
    $lplot->SetBarCenter();
    $graph->Add($bplot1);
    $graph->Stroke("charts/" . $name);
}
开发者ID:BrutalAndSick,项目名称:scrap,代码行数:42,代码来源:graficas.php

示例4: LinePlot

$graph->yaxis->title->Set('Basic Rate');
$graph->yaxis->title->SetFont(FF_ARIAL, FS_BOLD, 10);
$graph->yaxis->title->SetColor('black');
$graph->Add($lp1);
// First multi Y-axis plot
$lp2 = new LinePlot($datay2);
$lp2->SetLegend('2002');
$lp2->mark->SetType(MARK_DIAMOND);
$lp2->mark->SetWidth(15);
$lp2->mark->SetFillColor('darkred');
$lp2->SetCSIMTargets($targ2, $alts2);
$graph->ynaxis[0]->SetColor('darkred');
$graph->ynaxis[0]->title->Set('Rate A');
$graph->ynaxis[0]->title->SetFont(FF_ARIAL, FS_BOLD, 10);
$graph->ynaxis[0]->title->SetColor('darkred');
$graph->AddY(0, $lp2);
// Second multi Y-axis plot
$lp3 = new LinePlot($datay3);
$lp3->SetLegend('2003');
$lp3->mark->SetType(MARK_DIAMOND);
$lp3->mark->SetWidth(15);
$lp3->mark->SetFillColor('darkgreen');
$lp3->SetCSIMTargets($targ3, $alts3);
$graph->ynaxis[1]->SetColor('darkgreen');
$graph->ynaxis[1]->title->Set('Rate B');
$graph->ynaxis[1]->title->SetFont(FF_ARIAL, FS_BOLD, 10);
$graph->ynaxis[1]->title->SetColor('darkgreen');
$graph->AddY(1, $lp3);
// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM();
开发者ID:JackPotte,项目名称:xtools,代码行数:31,代码来源:mulyaxiscsimex1.php

示例5: addAudiogramme

 function addAudiogramme($values, $mark_color)
 {
     $pressions = CExamAudio::$pressions;
     // Empty plot case
     $datay = $values;
     CMbArray::removeValue("", $datay);
     if (!count($datay)) {
         return;
     }
     $title = $this->title->t;
     $words = explode(" ", $title);
     $cote = $words[1];
     $labels = array();
     $jscalls = array();
     // Remove empty values to connect distant points
     $datax = array();
     $datay = array();
     foreach ($values as $key => $value) {
         if ($value !== "" && $value !== null) {
             $pression = $pressions[$key];
             $jstitle = strtr($title, "\n", " ");
             $labels[] = "Modifier l'admittance {$value} ml pour {$jstitle} à la pression {$pression} mm H²0";
             $jscalls[] = "javascript:changeTympanValue('{$cote}',{$key})";
             $datay[] = $value;
             $datax[] = "{$key}";
             // Needs to be a string when null
         }
     }
     $p1 = new LinePlot($datay, $datax);
     // Create the first line
     $p1->SetColor($mark_color);
     $p1->SetCenter();
     $p1->SetWeight(1);
     $p1->SetCSIMTargets($jscalls, $labels);
     // Marks
     $p1->mark->SetType(MARK_FILLEDCIRCLE);
     $p1->mark->SetColor($mark_color);
     $p1->mark->SetFillColor("{$mark_color}@0.6");
     $p1->mark->SetWidth(4);
     $this->Add($p1);
 }
开发者ID:OpenXtrem,项目名称:mediboard-test,代码行数:41,代码来源:inc_graph_audio_tympan.php

示例6: addAudiogramme

 function addAudiogramme($points, $title, $mark_color, $mark_type)
 {
     CMbArray::removeValue(array("", ""), $points);
     // Empty plot case
     if (!count($points)) {
         $datay = array(50);
         $p1 = new LinePlot($datay, $datay);
         $this->Add($p1);
         return;
     }
     $words = explode(" ", $title);
     $cote = $words[1];
     $labels = array();
     $jscalls = array();
     $dBs = array();
     $pcs = array();
     foreach ($points as $key => $point) {
         $dB = @$point[0];
         $pc = @$point[1];
         $dBs[] = $dB;
         $pcs[] = $pc;
         $labels[] = "Modifier le valeur {$pc}%% à {$dB}dB pour l'oreille {$cote}";
         $jscalls[] = "javascript:changeVocalValue('{$cote}',{$key})";
     }
     $p1 = new LinePlot($pcs, $dBs);
     // Create the first line
     $p1->SetColor($mark_color);
     $p1->SetLegend($title);
     $p1->SetCSIMTargets($jscalls, $labels);
     $p1->SetWeight(1);
     // Marks
     $p1->mark->SetType($mark_type);
     $p1->mark->SetColor($mark_color);
     $p1->mark->SetFillColor("{$mark_color}@0.6");
     $p1->mark->SetWidth(5);
     // Create the splined line
     if (count($points) > 1) {
         /*
         $spline = new Spline($dBs, $pcs);
         list($sdBs, $spcs) = $spline->Get(40);
         $p2 = new LinePlot($spcs, $sdBs);
         $p2->SetColor("$mark_color:1.8");
         
         $this->Add($p2);
         */
         $spline = new BezierTD($dBs, $pcs, 5);
         list($bdBs, $bpcs) = $spline->Get(40);
         $p3 = new LinePlot($bpcs, $bdBs);
         $p3->SetColor("{$mark_color}:1.8");
         $this->Add($p3);
     }
     $this->Add($p1);
 }
开发者ID:fbone,项目名称:mediboard4,代码行数:53,代码来源:inc_graph_audio_vocal.php

示例7: array

    $data = array();
    $dataTargets = array();
    $dataNames = array();
    $previousAmount = null;
    foreach ($totals as $key => $currentAmount) {
        $data[] = is_null($previousAmount) || $currentAmount->compare($previousAmount) != 0 || $key == $displayEndDate->getTime() ? $currentAmount->get() : '-';
        $date = new Date($key);
        if ($showTickMarks) {
            $dataTargets[] = "javascript:reachThroughTrend('" . $date->getFormatted() . "', '" . implode(',', $accountIds) . "');";
            $dataNames[] = $date->getFormatted() . ': ' . $currentAmount->getFormatted();
        }
        $previousAmount = new Amount($currentAmount);
    }
    $line = new LinePlot($data, $xdata);
    if ($showTickMarks) {
        $line->SetCSIMTargets(array_values($dataTargets), array_values($dataNames));
        $line->mark->SetType(MARK_UTRIANGLE);
        $line->mark->SetColor($chartColors[$colorIndex % count($chartColors)]);
        $line->mark->SetFillColor($chartColors[$colorIndex % count($chartColors)]);
    }
    $line->SetColor($chartColors[$colorIndex % count($chartColors)]);
    $line->SetStepStyle();
    $line->SetLegend(getBadgerTranslation2('statistics', 'trendTotal'));
    $line->SetWeight(2);
    $colorIndex++;
    $graph->add($line);
}
$graph->xaxis->SetFont(FF_VERA);
$interval = $numDates / MAX_LABELS;
if ($interval < 1) {
    $interval = 1;
开发者ID:BackupTheBerlios,项目名称:badger-svn,代码行数:31,代码来源:trend.php

示例8: summary


//.........这里部分代码省略.........
             $result[] = $percentaje;
         } else {
             $days = $this->numberDaysPerMonth($yearCount, $monthCount);
             $arrayDays[] = $monthCount . '+' . $days;
             $daysElapsed = $daysElapsed + $days;
             $percentaje = $this->calculatePercentage($numberTotalDays, $daysElapsed);
             $result[] = $percentaje;
         }
         if ($monthCount == 12) {
             $monthCount = 0;
             $yearCount++;
         }
         $monthCount++;
     }
     $stringTmp = '';
     foreach ($arrayDays as $var) {
         $stringTmp = $stringTmp . (string) $var . ' - ';
     }
     //$datay3 = $result;
     // Setup the graph
     $graph = new Graph(900, 350);
     //$graph->SetScale("textlin");
     $graph->SetScale("intlin");
     //$graph->SetYScale(0,'int');
     //$graph->SetYScale(1,'int');
     $theme_class = new UniversalTheme();
     //$numberDays = $this->numberDaysBetweenTwoDates('2013-01-01','2014-01-01');
     //$numberMonth = $this->numberMonthBetweenTwoDates('2013-01-01','2013-12-20');
     //$month = $this->obtainInfoFromDate('2013-12-20');
     //$yearStart = $this->obtainInfoDate('2013-12-20', "Y");
     //$monthStart = $this->obtainInfoDate('2013-12-20', 'm');
     //$dayStart = $this->obtainInfoDate('2013-12-20','d');
     $graph->SetTheme($theme_class);
     $graph->img->SetAntiAliasing(false);
     //$numberTotalMonths = $this->numberMonthBetweenTwoDates($dateStart, $dateEnd);
     //$monthStart = $this->obtainInfoDate($dateStart, 'n');
     //$monthEnd = $this->obtainInfoDate($dateEnd, 'n');
     $monthNames = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');
     // $result = array();
     $counter = $monthStart - 1;
     $resultNames = array();
     $resultNames[] = '';
     for ($i = 0; $i < $numberTotalMonths; $i++) {
         $resultNames[] = $monthNames[$counter];
         $counter++;
         if ($counter == 12) {
             $counter = 0;
         }
     }
     $graph->title->Set('Pedidos ' . $numberTotalMonths . ' , ' . $numberTotalDays . ' , ' . $daysElapsed . ' : ' . $stringTmp . ' ; ' . $monthStart);
     //        $graph->title->Set('Evolución de pedidos ' . $numberTotalMonths . ' ' . $numberTotalDays . ' ' . $yearStart . ' ' . $monthStart . ' ' . $daysElapsed . ' ' . $percentaje . ' ' . $stringTmp);
     //$graph->title->Set('Evolución de pedidos ' . $numberTotalMonths);$arrayDays
     //$graph->title->Set('Evolución de pedidos');
     $graph->SetBox(false);
     $graph->img->SetAntiAliasing();
     $graph->yaxis->HideZeroLabel();
     $graph->yaxis->HideLine(false);
     $graph->yaxis->HideTicks(false, false);
     $graph->xgrid->Show();
     $graph->xgrid->SetLineStyle("solid");
     //$months = $this->buildArrayMonthName('2015-01-01','2016-01-01');
     //$graph->xaxis->SetTickLabels(array('Ene','Feb','Mar','Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Nov', 'Oct', 'Dic', 'Aux'));
     $graph->xaxis->SetTickLabels($resultNames);
     $graph->xgrid->SetColor('#E3E3E3');
     // Create the first line
     $p1 = new LinePlot($datay1);
     $graph->Add($p1);
     $p1->SetColor("#6495ED");
     $p1->SetLegend('Tienda 1');
     // Create the second line
     $p2 = new LinePlot($datay2);
     $graph->Add($p2);
     $p2->SetColor("#B22222");
     $p2->SetLegend('Tienda 2');
     // Create the third line
     $p3 = new LinePlot($result);
     $p3->SetColor("#FF1493");
     $p3->SetLegend('Tienda 3');
     $p3->SetCSIMTargets($targ1, $alts1);
     //-----------
     //$p3->value->SetFormat('%d');
     $p3->value->Show();
     $p3->value->SetColor('#55bbdd');
     $graph->Add($p3);
     // Standard Y-axis plot
     $lp1 = new LinePlot($datay1);
     $lp1->SetLegend('2001');
     $lp1->mark->SetType(MARK_DIAMOND);
     $lp1->mark->SetWidth(15);
     $lp1->mark->SetFillColor('orange');
     $lp1->SetCSIMTargets($targ1, $alts1);
     $graph->yaxis->title->Set('Basic Rate');
     //$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,10);
     //$graph->yaxis->title->SetFont(FS_NORMAL);
     $graph->yaxis->title->SetColor('black');
     $graph->Add($lp1);
     $graph->legend->SetFrameWeight(1);
     // Output line
     $graph->Stroke();
 }
开发者ID:josimarjimenez,项目名称:architects,代码行数:101,代码来源:GraphicsSummaryController.php


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