コード例 #1
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(55, 80, 46, 21, 95);
$axtitles = array("Jan", "Feb", "Mar", "Apr", "May");
// Create the graph and the plot
$graph = new SpiderGraph(250, 200, "auto");
$plot = new SpiderPlot($data);
$plot->SetLegend("Defects");
// Set position and size
$graph->SetCenter(0.5, 0.55);
$graph->SetTitles($axtitles);
$graph->title->Set("Result 2001");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD);
$graph->SupressTickMarks();
$graph->SetShadow();
$graph->SetColor(array(200, 230, 230));
$graph->grid->SetLineStyle("dashed");
$graph->grid->SetColor("darkred");
$graph->grid->Show();
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?>

	
コード例 #2
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(55, 80, 46, 21, 95);
$data2 = array(65, 95, 50, 75, 60);
$axtitles = array("Jan", "Feb", "Mar", "Apr", "May");
// Create the graph and the plot
$graph = new SpiderGraph(250, 200, "auto");
$graph->img->SetAntiAliasing("white");
$plot = new SpiderPlot($data);
$plot->SetLegend("Defects");
$plot2 = new SpiderPlot($data2);
$plot2->SetFill(false);
$plot2->SetLineWeight(2);
$plot2->SetColor("red");
$plot2->SetLegend("Target");
// Set position and size
$graph->SetCenter(0.5, 0.55);
$graph->SetTitles($axtitles);
$graph->title->Set("Result 2001");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->SupressTickMarks();
$graph->SetShadow();
//$graph->SetColor("teal");
$graph->grid->SetLineStyle("solid");
$graph->grid->SetColor("blue");
$graph->grid->Show();
// Add the plot and display the graph
//$graph->Add($plot);
コード例 #3
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
$graph = new SpiderGraph(300, 200, "auto");
$graph->SetColor("white");
$graph->SetShadow();
$graph->SetCenter(0.4, 0.55);
$graph->axis->SetFont(FF_FONT1, FS_BOLD);
$graph->axis->SetWeight(2);
$graph->grid->SetLineStyle("longdashed");
$graph->grid->SetColor("navy");
$graph->grid->Show();
$graph->SupressTickMarks();
$graph->title->Set("Quality result");
$graph->title->SetFont(FF_FONT1, FS_BOLD);
$graph->SetTitles(array("One", "Two", "Three", "Four", "Five", "Sex", "Seven", "Eight", "Nine", "Ten"));
$plot = new SpiderPlot(array(30, 80, 60, 40, 71, 81, 47));
$plot->SetLegend("Goal");
$plot->SetColor("red", "lightred");
$plot->SetFill(false);
$plot->SetLineWeight(2);
$plot2 = new SpiderPlot(array(70, 40, 30, 80, 31, 51, 14));
$plot2->SetLegend("Actual");
$plot2->SetColor("blue", "lightred");
$graph->Add($plot2);
$graph->Add($plot);
$graph->Stroke();
コード例 #4
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(55, 80, 46, 71, 95);
$axtitles = array("Jan", "Feb", "Mar", "Apr", "May");
// Create the graph and the plot
$graph = new SpiderGraph(250, 200, "auto");
$plot = new SpiderPlot($data);
$plot->SetLegend("Defects");
// Set position and size
$graph->SetCenter(0.5, 0.55);
$graph->SetTitles($axtitles);
$graph->axis->title->SetColor("navy");
$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD, 10);
$graph->title->Set("Result 2000");
$graph->title->SetFont(FF_COURIER, FS_BOLD, 11);
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?>

	
コード例 #5
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(55, 80, 46, 71, 95);
// Create the graph and the plot
$graph = new SpiderGraph(250, 200, "auto");
$plot = new SpiderPlot($data);
// Set position and size
$graph->SetPlotSize(0.4);
$graph->SetCenter(0.3);
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?>

	
コード例 #6
0
<?php

include "../jpgraph.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(55, 80, 46, 71, 95);
// Create the graph and the plot
$graph = new SpiderGraph(250, 200, "auto");
$plot = new SpiderPlot($data);
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
コード例 #7
0
<?php

include "../jpgraph.php";
include "../jpgraph_log.php";
include "../jpgraph_spider.php";
// Some data to plot
$data = array(242, 58, 500, 12, 397, 810, 373);
// Create the graph
$graph = new SpiderGraph(200, 200, "auto");
// Uncomment the following line to use anti-aliasing
// Note: Enabling this results in a very noticable slow
// down of the image generation! And more load on your
// server. Use it wisly!!
$graph->img->SetAntiAliasing();
// Make the spider graph fill out it's bounding box
$graph->SetPlotSize(0.85);
// Use logarithmic scale (If you don't use any SetScale()
// the spider graph will default to linear scale
$graph->SetScale("log");
// Uncomment the following line if you want to supress
// minor tick marks
// $graph->yscale->ticks->SupressMinorTickMarks();
// We want the major tick marks to be black and minor
// slightly less noticable
$graph->yscale->ticks->SetMarkColor("black", "darkgray");
// Set the axis title font
$graph->axis->title->SetFont(FF_ARIAL, FS_BOLD, 12);
// Use blue axis
$graph->axis->SetColor("blue");
$plot = new SpiderPlot($data);
$plot->SetLineWeight(2);