當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pData::AddSeries方法代碼示例

本文整理匯總了PHP中pData::AddSeries方法的典型用法代碼示例。如果您正苦於以下問題:PHP pData::AddSeries方法的具體用法?PHP pData::AddSeries怎麽用?PHP pData::AddSeries使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pData的用法示例。


在下文中一共展示了pData::AddSeries方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testDrawRadar

 public function testDrawRadar()
 {
     // Dataset definition
     $DataSet = new pData();
     $DataSet->addPoints(array("Memory", "Disk", "Network", "Slots", "CPU"), "Label");
     $DataSet->addPoints(array(1, 2, 3, 4, 3), "Serie1");
     $DataSet->addPoints(array(1, 4, 2, 6, 2), "Serie2");
     $DataSet->AddSeries("Serie1");
     $DataSet->AddSeries("Serie2");
     $DataSet->SetAbscissaLabelSeries("Label");
     $DataSet->SetSeriesName("Reference", "Serie1");
     $DataSet->SetSeriesName("Tested computer", "Serie2");
     // Initialise the graph
     $canvas = new TestCanvas();
     $Test = new pChart(400, 400, $canvas);
     $Test->setFontProperties("Fonts/tahoma.ttf", 8);
     $Test->setGraphArea(30, 30, 370, 370);
     // Draw the radar graph
     $Test->drawRadarAxis($DataSet->GetData(), $DataSet->GetDataDescription(), TRUE, 20, new Color(120), new Color(230));
     $Test->drawRadar($DataSet->GetData(), $DataSet->GetDataDescription(), 50);
     // Finish the graph
     $Test->drawLegend(15, 15, $DataSet->GetDataDescription(), new Color(255));
     $Test->setFontProperties("Fonts/tahoma.ttf", 10);
     $Test->drawTitle(0, 22, "Example 8", new Color(50), 400);
     $this->assertEquals('be9f2fb9cb890e3ffdae443376d80be9', md5($canvas->getActionLog()));
 }
開發者ID:rbraband,項目名稱:pChart,代碼行數:26,代碼來源:pChartTest.php

示例2: pData

 Example8 : A radar graph
*/
// Standard inclusions
require_once "../lib/pData.php";
require_once "../lib/pChart.php";
require_once '../lib/GDCanvas.php';
require_once '../lib/BackgroundStyle.php';
// Definitions
$DataSet = new pData();
$Canvas = new GDCanvas(400, 400);
$Chart = new pChart(400, 400, $Canvas);
// Dataset
$DataSet->AddPoints(array("Memory", "Disk", "Network", "Slots", "CPU"), "Label");
$DataSet->AddPoints(array(1, 2, 3, 4, 3), "Serie1");
$DataSet->AddPoints(array(1, 4, 2, 6, 2), "Serie2");
$DataSet->AddSeries("Serie1");
$DataSet->AddSeries("Serie2");
$DataSet->SetAbscissaLabelSeries("Label");
$DataSet->SetSeriesName("Reference", "Serie1");
$DataSet->SetSeriesName("Tested computer", "Serie2");
// Initialise the graph
$Chart->setFontProperties("../Fonts/tahoma.ttf", 8);
$Chart->setGraphArea(30, 30, 370, 370);
// Draw the radar graph
$Chart->drawRadarAxis($DataSet->GetData(), $DataSet->GetDataDescription(), TRUE, 20, new Color(120), new Color(230));
$Chart->drawFilledRadar($DataSet->GetData(), $DataSet->GetDataDescription(), 50, 20);
// Finish the graph
$Chart->drawLegend(15, 15, $DataSet->GetDataDescription(), new Color(255));
$Chart->setFontProperties("../Fonts/tahoma.ttf", 10);
$Chart->drawTitle(0, 22, "Example 8", new Color(50), 400);
$Chart->Render("Example8.png");
開發者ID:rbraband,項目名稱:pChart,代碼行數:31,代碼來源:Example8.php


注:本文中的pData::AddSeries方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。