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


PHP BarPlot::SetShadow方法代码示例

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


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

示例1: barGraph_2

 public function barGraph_2($data, $examinee_id, $color = 'green')
 {
     require_once '../app/classes/jpgraph/jpgraph_bar.php';
     // Create the graph. These two calls are always required
     $graph = new Graph(400, 334);
     $graph->SetScale('textlin');
     $graph->SetShadow(true, 5, 'white');
     // Adjust the margin a bit to make more room for titles
     $graph->SetMargin(40, 30, 20, 40);
     $graph->SetFrame(true, 'black', 1);
     // Create a bar pot
     $datay = array();
     $datalabel = array();
     foreach ($data as $value) {
         $datay[] = $value['score'];
         $datalabel[] = $value['chs_name'];
     }
     $bplot = new BarPlot($datay);
     // Adjust fill color
     $bplot->SetFillColor($color);
     $bplot->SetShadow("white");
     $graph->Add($bplot);
     // Setup labels
     $lbl = $datalabel;
     $graph->xaxis->SetTickLabels($lbl);
     $graph->xaxis->SetFont(FF_CHINESE, FS_BOLD, 12);
     // Send back the HTML page which will call this script again
     // to retrieve the image.
     //临时文件命名规范    $examinee_id_$date_rand(100,900)
     $date = date('H_i_s');
     $stamp = rand(100, 900);
     $fileName = './tmp/' . $examinee_id . '_' . $date . '_' . $stamp . '.jpeg';
     $graph->Stroke($fileName);
     return $fileName;
 }
开发者ID:sunxfancy,项目名称:Questionnaire,代码行数:35,代码来源:WordChart.php

示例2: index

 public function index()
 {
     // We want a bar graph, so use JpGraph's bar chart library
     require_once APPPATH . '/libraries/JpGraph/jpgraph_bar.php';
     // Example data (04/2015)
     $json = '[{"Hogwarts Academy":{"Yield":"19021 kWh","Yield specific":"127.01 kWh\\/kWp","Target yield":"16069.23 kWh","Current-target yield %":"<span style=\\"color: #3ab121\\">118.37 %<span>"}},{"cols": [{"id":"","label":"Time","pattern":"","type":"string"},{"id":"","label":"Hogwarts Academy (AC)","pattern":"","type":"number"},{"id":"","label":"Target values","pattern":"","type":"number"}], "rows": [{"c":[{"v":"01/04","f":null}, {"v":615.8,"f":"615,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"02/04","f":null}, {"v":712.5,"f":"712,50 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"03/04","f":null}, {"v":171,"f":"171,00 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"04/04","f":null}, {"v":382.3,"f":"382,30 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"05/04","f":null}, {"v":606.3,"f":"606,30 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"06/04","f":null}, {"v":774.5,"f":"774,50 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"07/04","f":null}, {"v":570.6,"f":"570,60 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"08/04","f":null}, {"v":726.8,"f":"726,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"09/04","f":null}, {"v":789.2,"f":"789,20 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"10/04","f":null}, {"v":592.9,"f":"592,90 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"11/04","f":null}, {"v":677.1,"f":"677,10 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"12/04","f":null}, {"v":244.5,"f":"244,50 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"13/04","f":null}, {"v":457.4,"f":"457,40 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"14/04","f":null}, {"v":340.8,"f":"340,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"15/04","f":null}, {"v":425.3,"f":"425,30 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"16/04","f":null}, {"v":828.8,"f":"828,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"17/04","f":null}, {"v":616.8,"f":"616,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"18/04","f":null}, {"v":660.3,"f":"660,30 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"19/04","f":null}, {"v":453.2,"f":"453,20 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"20/04","f":null}, {"v":691.9,"f":"691,90 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"21/04","f":null}, {"v":904.4,"f":"904,40 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"22/04","f":null}, {"v":879.1,"f":"879,10 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"23/04","f":null}, {"v":824.8,"f":"824,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"24/04","f":null}, {"v":777.9,"f":"777,90 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"25/04","f":null}, {"v":413.8,"f":"413,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"26/04","f":null}, {"v":834.8,"f":"834,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"27/04","f":null}, {"v":920.8,"f":"920,80 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"28/04","f":null}, {"v":751,"f":"751,00 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"29/04","f":null}, {"v":737.7,"f":"737,70 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]},{"c":[{"v":"30/04","f":null}, {"v":638.7,"f":"638,70 kWh"}, {"v":535.640966432,"f":"535,64 kWh"}]}]}]';
     // Turn string into object
     $obj = json_decode($json);
     // Stores for graph data
     $xdata = array();
     $ydata = array();
     // Get coords data from object
     $obj_data = $obj[1]->rows;
     $counter = 1;
     // Add it to each of our storage arrays
     foreach ($obj_data as $data) {
         // only plot when there is a kW value
         if (isset($data->c[1]->v)) {
             $xdata[] = $data->c[0]->v;
             // date
             $ydata[] = $data->c[1]->v;
             // kw
         }
     }
     // Create the graph.
     // One minute timeout for the cached image
     // INLINE_NO means don't stream it back to the browser.
     $graph = new Graph(600, 350, 'auto');
     $graph->SetScale("textlin");
     $graph->img->SetMargin(60, 30, 20, 40);
     $graph->yaxis->SetTitleMargin(45);
     $graph->yaxis->scale->SetGrace(30);
     $graph->SetShadow();
     // Turn the tickmarks
     $graph->xaxis->SetTickSide(SIDE_DOWN);
     $graph->yaxis->SetTickSide(SIDE_LEFT);
     // Create a bar pot
     $bplot = new BarPlot($ydata);
     $bplot->SetFillColor("orange");
     // Use a shadow on the bar graphs (just use the default settings)
     $bplot->SetShadow();
     $bplot->value->SetFormat(" %2.1f kW", 70);
     $bplot->value->SetFont(FF_VERDANA, FS_NORMAL, 8);
     $bplot->value->SetColor("blue");
     $bplot->value->Show();
     $graph->Add($bplot);
     $graph->title->Set("Hogwarts Academy");
     $graph->xaxis->title->Set("Day");
     $graph->yaxis->title->Set("Yield in kilowatt hours");
     $graph->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
     // Send back the HTML page which will call this script again
     // to retrieve the image.
     $graph->StrokeCSIM();
 }
开发者ID:alexismansilla,项目名称:codeigniter-jpgraph,代码行数:56,代码来源:grapher.php

示例3: iterationSummaryAux

 public function iterationSummaryAux($id)
 {
     JpGraph\JpGraph::load();
     JpGraph\JpGraph::module('bar');
     $datay = array(12, 26, 9, 17, 31);
     // Create the graph.
     // One minute timeout for the cached image
     // INLINE_NO means don't stream it back to the browser.
     $graph = new Graph(310, 250, 'auto');
     $graph->SetScale("textlin");
     $graph->img->SetMargin(60, 30, 20, 40);
     $graph->yaxis->SetTitleMargin(45);
     $graph->yaxis->scale->SetGrace(30);
     $graph->SetShadow();
     // Turn the tickmarks
     $graph->xaxis->SetTickSide(SIDE_DOWN);
     $graph->yaxis->SetTickSide(SIDE_LEFT);
     // Create a bar pot
     $bplot = new BarPlot($datay);
     // Create targets for the image maps. One for each column
     $targ = array("bar_clsmex1.php#1", "bar_clsmex1.php#2", "bar_clsmex1.php#3", "bar_clsmex1.php#4", "bar_clsmex1.php#5", "bar_clsmex1.php#6");
     $alts = array("val=%d", "val=%d", "val=%d", "val=%d", "val=%d", "val=%d");
     $bplot->SetCSIMTargets($targ, $alts);
     $bplot->SetFillColor("orange");
     // Use a shadow on the bar graphs (just use the default settings)
     $bplot->SetShadow();
     $bplot->value->SetFormat(" \$ %2.1f", 70);
     $bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 9);
     $bplot->value->SetColor("blue");
     $bplot->value->Show();
     $graph->Add($bplot);
     $graph->title->Set("Image maps barex1");
     $graph->xaxis->title->Set("X-title");
     $graph->yaxis->title->Set("Y-title");
     $graph->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
     $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
     // Send back the HTML page which will call this script again
     // to retrieve the image.
     $graph->StrokeCSIM();
 }
开发者ID:josimarjimenez,项目名称:architects,代码行数:41,代码来源:GraphicsController.php

示例4: generate_image

function generate_image()
{
    global $percent, $legend;
    // Create the graph. These two calls are always required
    $graph = new Graph(550, 250);
    $graph->SetScale("textlin");
    $graph->yaxis->scale->SetGrace(20);
    $graph->xaxis->SetLabelmargin(5);
    $graph->xaxis->SetTickLabels($legend);
    $graph->ygrid->SetFill(true, '#EFEFEF@0.5', '#BBCCFF@0.5');
    // Add a drop shadow
    $graph->SetShadow();
    // Adjust the margin a bit to make more room for titles
    $graph->img->SetMargin(50, 30, 20, 40);
    // Create a bar pot
    $bplot = new BarPlot($percent);
    // Adjust fill color
    $bplot->SetFillColor('#9999CC');
    $bplot->SetShadow();
    $bplot->value->Show();
    $bplot->value->SetFont(FF_ARIAL, FS_BOLD, 10);
    $bplot->value->SetAngle(45);
    $bplot->value->SetFormat('%0.0f');
    // Width
    $bplot->SetWidth(0.6);
    $graph->Add($bplot);
    // Setup the titles
    $graph->title->Set("PHP documentation");
    $graph->xaxis->title->Set("Language");
    $graph->yaxis->title->Set("Files up to date (%)");
    $graph->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
    $graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
    // Display the graph
    $graph->Stroke('../www/images/revcheck/info_revcheck_php_all_lang.png');
}
开发者ID:phpsource,项目名称:web-doc,代码行数:36,代码来源:gen_picture_info_all_lang.php

示例5: BarPlot

$graph->title->SetColor("$titlecolor");
*/
// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1, FS_NORMAL, 8);
$graph->yaxis->SetFont(FF_FONT1, FS_NORMAL, 11);
// Show 0 label on Y-axis (default is not to show)
$graph->yscale->ticks->SupressZeroLabel(false);
// Setup X-axis labels
$graph->xaxis->SetTickLabels($datax);
if ($gorientation == "v") {
    $graph->img->SetAngle(90);
    $graph->Set90AndMargin(120, 40, 40, 40);
} else {
    $graph->xaxis->SetLabelAngle(90);
}
//Setup Frame
$graph->SetFrame(true, "#fafafa");
//$graph->SetFrame(false);
// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
// Setup color for gradient fill style
//$bplot->SetFillGradient($color, $color2, GRAD_MIDVER);
$bplot->SetFillColor("#DF7E0D@0.5");
$bplot->SetShadow("#DF7E0D@0.7", 5, 5);
// Set color for the frame of each bar
$bplot->SetColor("#DF7E0D@1");
$graph->Add($bplot);
// Finally send the graph to the browser
$graph->Stroke();
unset($graph);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:ports_graph.php

示例6: LinePlot

// Use built in font
$graph->title->SetFont(FF_FONT1, FS_BOLD);
// Make the margin around the plot a little bit bigger
// then default
$graph->img->SetMargin(40, 140, 40, 80);
// Slightly adjust the legend from it's default position in the
// top right corner to middle right side
$graph->legend->Pos(0.05, 0.5, "right", "center");
// Display every 10:th datalabel
$graph->xaxis->SetTextTickInterval(6);
$graph->xaxis->SetTextLabelInterval(2);
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetLabelAngle(90);
// Create a red line plot
$p1 = new LinePlot($datay);
$p1->SetColor("red");
$p1->SetLegend("Pressure");
// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
$b1->SetAbsWidth(6);
$b1->SetShadow();
// The order the plots are added determines who's ontop
$graph->Add($p1);
$graph->Add($b1);
// Finally output the  image
$graph->Stroke();
?>


开发者ID:hcvcastro,项目名称:pxp,代码行数:28,代码来源:linebarex1.php

示例7: BarPlot

$graph->SetScale("textint");
$graph->SetShadow();
$graph->SetFrame(false);
// No border around the graph
// Add some grace to the top so that the scale doesn't
// end exactly at the max value.
$graph->yaxis->scale->SetGrace(100);
// Setup X-axis labels
$a = $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetFont(FF_FONT2);
// Setup graph title ands fonts
$graph->title->Set("Example of integer Y-scale");
$graph->title->SetFont(FF_FONT2, FS_BOLD);
$graph->xaxis->title->Set("Year 2002");
$graph->xaxis->title->SetFont(FF_FONT2, FS_BOLD);
// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetWidth(0.5);
$bplot->SetShadow();
// Setup the values that are displayed on top of each bar
$bplot->value->Show();
// Must use TTF fonts if we want text at an arbitrary angle
$bplot->value->SetFont(FF_ARIAL, FS_BOLD);
$bplot->value->SetAngle(45);
// Black color for positive values and darkred for negative values
$bplot->value->SetColor("black", "darkred");
$graph->Add($bplot);
// Finally stroke the graph
$graph->Stroke();
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:31,代码来源:barintex1.php

示例8: array

$datay1 = array(35, 160, 0, 0, 0, 0);
$datay2 = array(35, 190, 190, 190, 190, 190);
$datay3 = array(20, 70, 70, 140, 230, 260);
$graph = new Graph(450, 200, 'auto');
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->img->SetMargin(40, 30, 40, 40);
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
$graph->xaxis->title->Set('Year 2002');
$graph->xaxis->title->SetFont(FF_FONT1, FS_BOLD);
$graph->title->Set('Group bar plot');
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$bplot1 = new BarPlot($datay1);
$bplot2 = new BarPlot($datay2);
$bplot3 = new BarPlot($datay3);
$bplot1->SetFillColor("orange");
$bplot2->SetFillColor("brown");
$bplot3->SetFillColor("darkgreen");
$bplot1->SetShadow();
$bplot2->SetShadow();
$bplot3->SetShadow();
$bplot1->SetShadow();
$bplot2->SetShadow();
$bplot3->SetShadow();
$gbarplot = new GroupBarPlot(array($bplot1, $bplot2, $bplot3));
$gbarplot->SetWidth(0.6);
$graph->Add($gbarplot);
$graph->Stroke();
?>

开发者ID:hcvcastro,项目名称:pxp,代码行数:29,代码来源:groupbarex1.php

示例9: Graph

$color = "navy";
$color2 = "navy";
//$color2 = "lightsteelblue";
// Setup graph
$graph = new Graph($width, 250, "auto");
$graph->SetScale("textlin");
$graph->SetMarginColor($background);
$graph->img->SetMargin(40, 30, 20, 40);
//$graph->SetShadow();
//Setup Frame
$graph->SetFrame(true, "#ffffff");
// Setup graph title
$graph->title->Set($title);
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);
//$bplot->SetFillGradient($color, $color2, GRAD_MIDVER);
//$bplot->SetColor($color);
// color@transparencia
$bplot->SetFillColor(array(COLOR1 . "@0.5"));
//
$bplot->SetShadow(array(COLOR1 . "@0.7"), 5, 5);
$bplot->SetColor(array(COLOR1 . "@1"));
//
$graph->Add($bplot);
$graph->xaxis->SetTickLabels($labelx);
//$graph->xaxis->SetLabelAngle(40); // only with TTF fonts
$graph->title->Set($title);
$graph->xaxis->title->Set($titley);
$graph->yaxis->title->Set($titlex);
$graph->Stroke();
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:incidents_bar_graph.php

示例10: graficar_defectos

function graficar_defectos($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, 140);
    $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->SetFormat("%0.1f");
    $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->SetBarCenter();
    $graph->Add($bplot1);
    $graph->Add($lplot);
    $graph->Stroke("charts/" . $name);
}
开发者ID:BrutalAndSick,项目名称:scrap,代码行数:43,代码来源:graficas.php

示例11: Graph

 }
 $pdf->Ln(3);
 $graph = new Graph(500, 250, 'auto');
 $graph->img->SetAntiAliasing(false);
 $graph->SetScale("textlin");
 $graph->img->SetMargin(30, 15, 15, 30);
 if (count($mediciones) === 1) {
     $graph->xaxis->SetTickLabels(array('1'));
 } else {
     $graph->xaxis->SetTickLabels(array('1', '2', '3'));
 }
 if (count($mediciones) === 1) {
     $datay1 = array($datay1[0]);
 }
 $bplot1 = new BarPlot($datay1);
 $bplot1->SetShadow();
 // Setup color for gradient fill style
 $bplot1->SetFillGradient("dodgerblue4", "lightsteelblue", GRAD_HOR);
 // Set color for the frame of each bar
 $bplot1->SetColor("black");
 $graph->Add($bplot1);
 if (count($mediciones) === 1) {
     $datay2 = array($datay2[0]);
 }
 $p1 = new LinePlot($datay2);
 $graph->Add($p1);
 $p1->mark->SetType(MARK_DIAMOND);
 $p1->mark->SetWidth(8);
 $p1->mark->SetFillColor('navy');
 $p1->SetBarCenter();
 $p1->SetColor('navy');
开发者ID:jmoreno0118,项目名称:Microv2,代码行数:31,代码来源:index.php

示例12: Deviation

$graph3->yaxis->SetColor('black');
$graph3->yaxis->title->Set('time(us)');
$graph3->yaxis->title->SetFont(FF_FONT1, FS_BOLD);
$graph3->ygrid->SetColor('black');
$graph3->yaxis->SetTitleMargin(45);
$graph3->yaxis->scale->SetGrace(30);
// TITRE: texte
$graph3->title->Set("Pthread kill latency -Mesuring Standard Deviation(us)");
// TITRE: marge et apparence
$graph3->title->SetFont(FF_FONT1, FS_BOLD, 11);
// Couleurs et transparence par histogramme
$bplot3 = new BarPlot($data4);
$bplot3->SetFillColor('red');
$bplot3->value->SetFormat('%01.3f');
$bplot3->value->Show();
$bplot3->SetShadow('black');
$bplot3->value->SetColor("black", "darkred");
$bplot3->SetShadow('black');
$bplot3->SetWidth(0.3);
$graph3->Add($bplot3);
//-----------------------
// Create a multigraph
//----------------------
$mgraph = new MGraph();
$mgraph->SetMargin(10, 10, 10, 10);
$mgraph->SetFrame(true, 'darkgray', 2);
$mgraph->SetBackgroundImage('../fond.png');
$mgraph->AddMix($graph, 0, 0, 85);
$mgraph->AddMix($graph1, 0, 270, 85);
$mgraph->AddMix($graph2, 0, 540, 85);
$mgraph->AddMix($graph3, 0, 810, 85);
开发者ID:hichem,项目名称:emblinux_website,代码行数:31,代码来源:img7.php

示例13: show

 public static function show()
 {
     $level_id = wbRequest::getVarClean('level_id', 'int', 0);
     $tahun = wbRequest::getVarClean('tahun', 'str', '');
     //timestamp
     $t = wbRequest::getVarClean('t', 'str', '');
     if (empty($level_id) or empty($tahun)) {
         exit;
     }
     try {
         $ws_client = self::getNusoap();
         $params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'dashboard_pendidikan', 'method' => 'show', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
         $ws_data = self::getResultData($ws_client, $params);
         $data['items'] = $ws_data['data'];
         $data['total'] = $ws_data['total'];
         $data['message'] = $ws_data['message'];
         $data['success'] = $ws_data['success'];
     } catch (Exception $e) {
         $data['message'] = $e->getMessage();
     }
     $items = $data['items']['items'];
     $itemLevel = $data['items']['itemLevel'];
     //$items = $tSchoolType->getAllByLevelID($level_id, $tahun);
     //$itemLevel = $tSchoolLevel->get($level_id);
     $print = wbRequest::getVarClean('print', 'int', 0);
     if (!empty($print)) {
         wbUtil::startExcel('pendidikan_dashboard.xls');
     }
     echo '<div class="body-wrap">';
     echo '<div style="float:left;margin:5 5 0 5;">';
     echo '<div><h3>JUMLAH SISWA ' . strtoupper($itemLevel['description']) . ' <br/>BERDASARKAN JENISNYA - TAHUN ' . $tahun . '</h3></div>';
     if (!empty($print)) {
         echo '<table border="1" width ="100%">';
     } else {
         echo '<table border="0" class="table-data" width ="100%">';
     }
     echo '<tr>
             <th width="15">No</th>
             <th width="150">Jenis ' . $itemLevel['description'] . '</th>
             <th width="100">Jumlah Masuk </th>
             <th width="100">Jumlah Lulus </th>
             <th width="100">Jumlah Aktif </th>
           </tr>';
     $i = 1;
     $datay = array();
     $dataCode = array();
     foreach ($items as $item) {
         $datay[] = $item['jml_masuk'];
         $dataCode[] = $item['code'];
         echo '<tr>';
         echo '<td>' . $i++ . '</td>';
         echo '<td>' . $item['code'] . '</td>';
         echo '<td align="right">' . wbUtil::numberFormat($item['jml_masuk'], 0) . '</td>';
         echo '<td align="right">' . wbUtil::numberFormat($item['jml_lulus'], 0) . '</td>';
         echo '<td align="right">' . wbUtil::numberFormat($item['jml_aktif'], 0) . '</td>';
         echo '</tr>';
     }
     echo '</table>';
     wbCore::loadJPGraph();
     // Create the graph and setup the basic parameters
     $graph = new Graph(550, 300, 'auto');
     $graph->img->SetMargin(40, 30, 40, 40);
     $graph->SetScale("textint");
     $graph->SetFrame(true, 'white', 1);
     $graph->SetColor('#C9C9C9');
     $graph->SetMarginColor('#D0DEF0');
     // Add some grace to the top so that the scale doesn't
     // end exactly at the max value.
     //$graph->yaxis->scale->SetGrace(20);
     // Setup X-axis labels
     $graph->xaxis->SetTickLabels($dataCode);
     $graph->xaxis->SetFont(FF_FONT1);
     $graph->xaxis->SetColor('#400000', 'black');
     // Stup "hidden" y-axis by given it the same color
     // as the background
     $graph->yaxis->SetColor('lightblue', '#004080');
     $graph->ygrid->SetColor('white');
     // Setup graph title ands fonts
     $graph->title->Set('GRAFIK SISWA ' . strtoupper($itemLevel['description']) . ' - TAHUN ' . $tahun);
     // Create a bar pot
     $bplot = new BarPlot($datay);
     $bplot->SetFillColor('#6C6CFF');
     $bplot->SetColor('darkblue');
     $bplot->SetWidth(0.5);
     $bplot->SetShadow('darkgray');
     // Setup the values that are displayed on top of each bar
     $bplot->value->Show();
     // Must use TTF fonts if we want text at an arbitrary angle
     $bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
     $bplot->value->SetFormat('%d');
     // Black color for positive values and darkred for negative values
     $bplot->value->SetColor("black", "darkred");
     $graph->Add($bplot);
     // Finally stroke the graph
     $graph->Stroke('var/dashboard/dashboard_pendidikan.png');
     echo '</div>';
     echo '</div>';
     echo '<div style="float:right;margin:15 5 0 5;"> <img src="' . wbServer::getBaseURL() . 'var/dashboard/dashboard_pendidikan.png?' . $t . '" alt="' . $t . '" /> </div>';
     exit;
 }
开发者ID:rayminami,项目名称:mpd-wp,代码行数:100,代码来源:dashboard_pendidikan_controller.php

示例14: BarPlot

$bplot6 = new BarPlot($t_arr6);
$bplot7 = new BarPlot($t_arr7);
$bplot1->SetFillColor('indianred2');
$bplot2->SetFillColor('maroon1');
$bplot3->SetFillColor('gold1');
$bplot4->SetFillColor('lightyellow');
$bplot5->SetFillColor('cornflowerblue');
$bplot6->SetFillColor('darkseagreen2');
$bplot7->SetFillColor('white');
$bplot1->SetShadow();
$bplot2->SetShadow();
$bplot3->SetShadow();
$bplot4->SetShadow();
$bplot5->SetShadow();
$bplot6->SetShadow();
$bplot7->SetShadow();
/*	$bplot1->SetLegend( 'New' );
	$bplot2->SetLegend( 'Feedback' );
	$bplot3->SetLegend( 'Acked' );
	$bplot4->SetLegend( 'Fixed' );
	$bplot5->SetLegend( 'Assigned' );
	$bplot6->SetLegend( 'Resolved' );
	$bplot7->SetLegend( 'Closed' );*/
/*	$bplot1->value->Show();
	$bplot2->value->Show();
	$bplot3->value->Show();
	$bplot4->value->Show();
	$bplot5->value->Show();
	$bplot6->value->Show();
	$bplot7->value->Show();*/
$bplot1->value->SetFont(FF_FONT0);
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:graph_reported_by_me.php

示例15: show

 public static function show()
 {
     $data = array('items' => array(), 'total' => 0, 'success' => false, 'message' => '');
     $jenis_jalan = wbRequest::getVarClean('jenis_jalan', 'int', 0);
     if (empty($jenis_jalan)) {
         exit;
     }
     try {
         $ws_client = self::getNusoap();
         $params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'dashboard_jalan', 'method' => 'show', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
         $ws_data = self::getResultData($ws_client, $params);
         $data['items'] = $ws_data['data'];
         $data['total'] = $ws_data['total'];
         $data['message'] = $ws_data['message'];
         $data['success'] = $ws_data['success'];
     } catch (Exception $e) {
         $data['message'] = $e->getMessage();
     }
     $items = $data['items'];
     echo '<div class="body-wrap">';
     echo '<div style="float:left;margin:5 5 0 5;">';
     echo '<div><h3>DATA JALAN</h3></div>';
     echo '<table class="table-data">';
     echo '<tr>
             <th width="30">No</th>
             <th width="200">Jenis Jalan</th>
             <th width="100">Panjang(Km)</th>
           </tr>';
     $i = 1;
     $datay = array();
     $dataCode = array();
     foreach ($items as $item) {
         $datay[] = $item['panjang'];
         $dataCode[] = $item['param_name'];
         echo '<tr>';
         echo '<td>' . $i++ . '</td>';
         echo '<td>' . $item['param_name'] . '</td>';
         echo '<td align="right">' . wbUtil::numberFormat($item['panjang'], 0) . '</td>';
         echo '</tr>';
     }
     echo '</table>';
     wbCore::loadJPGraph();
     // Create the graph and setup the basic parameters
     $graph = new Graph(550, 300, 'auto');
     $graph->img->SetMargin(40, 30, 40, 40);
     $graph->SetScale("textint");
     $graph->SetFrame(true, 'white', 1);
     $graph->SetColor('#C9C9C9');
     $graph->SetMarginColor('#D0DEF0');
     // Add some grace to the top so that the scale doesn't
     // end exactly at the max value.
     //$graph->yaxis->scale->SetGrace(20);
     // Setup X-axis labels
     $graph->xaxis->SetTickLabels($dataCode);
     $graph->xaxis->SetFont(FF_FONT1);
     $graph->xaxis->SetColor('#400000', 'black');
     // Stup "hidden" y-axis by given it the same color
     // as the background
     $graph->yaxis->SetColor('lightblue', '#004080');
     $graph->ygrid->SetColor('white');
     // Setup graph title ands fonts
     $graph->title->Set('DATA JALAN');
     // Create a bar pot
     $bplot = new BarPlot($datay);
     $bplot->SetFillColor('#6C6CFF');
     $bplot->SetColor('darkblue');
     $bplot->SetWidth(0.5);
     $bplot->SetShadow('darkgray');
     // Setup the values that are displayed on top of each bar
     $bplot->value->Show();
     // Must use TTF fonts if we want text at an arbitrary angle
     $bplot->value->SetFont(FF_ARIAL, FS_NORMAL, 8);
     $bplot->value->SetFormat('%d');
     // Black color for positive values and darkred for negative values
     $bplot->value->SetColor("black", "darkred");
     $graph->Add($bplot);
     // Finally stroke the graph
     $graph->Stroke('var/dashboard/dashboard_jalan.png');
     echo '</div>';
     echo '</div>';
     echo '<div style="float:right;margin:15 5 0 5;"> <img src="var/dashboard/dashboard_jalan.png?' . $t . '" alt="' . $t . '" /> </div>';
     exit;
 }
开发者ID:rayminami,项目名称:mpd-wp,代码行数:83,代码来源:dashboard_jalan_controller.php


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