本文整理汇总了PHP中RadarPlot::SetFillColor方法的典型用法代码示例。如果您正苦于以下问题:PHP RadarPlot::SetFillColor方法的具体用法?PHP RadarPlot::SetFillColor怎么用?PHP RadarPlot::SetFillColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RadarPlot
的用法示例。
在下文中一共展示了RadarPlot::SetFillColor方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_radar.php';
$titles = array("N", '', "NW", '', "W", '', "SW", '', 'S', '', "SE", '', "E", '', "NE", '');
$data = array(0, 0, 8, 10, 70, 90, 42, 0, 70, 60, 50, 40, 30, 40, 37.8, 72);
$graph = new RadarGraph(250, 270);
$graph->title->Set("Accumulated PPM");
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12);
$graph->subtitle->Set("(according to direction)");
$graph->subtitle->SetFont(FF_VERDANA, FS_ITALIC, 10);
$graph->SetTitles($titles);
$graph->SetCenter(0.5, 0.55);
$graph->HideTickMarks();
$graph->SetColor('lightyellow');
$graph->axis->SetColor('darkgray@0.3');
$graph->grid->SetColor('darkgray@0.3');
$graph->grid->Show();
$graph->SetGridDepth(DEPTH_BACK);
$plot = new RadarPlot($data);
$plot->SetColor('red@0.2');
$plot->SetLineWeight(1);
$plot->SetFillColor('red@0.7');
$graph->Add($plot);
$graph->Stroke();
示例2: _renderPlotRadar
private function _renderPlotRadar($groupID)
{
$radarStyle = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle();
$seriesCount = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount();
$seriesPlots = array();
// Loop through each data series in turn
for ($i = 0; $i < $seriesCount; ++$i) {
$dataValuesY = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues();
$dataValuesX = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues();
$marker = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker();
$dataValues = array();
foreach ($dataValuesY as $k => $dataValueY) {
$dataValues[$k] = implode(' ', array_reverse($dataValueY));
}
$tmp = array_shift($dataValues);
$dataValues[] = $tmp;
$tmp = array_shift($dataValuesX);
$dataValuesX[] = $tmp;
$this->_graph->SetTitles(array_reverse($dataValues));
$seriesPlot = new RadarPlot(array_reverse($dataValuesX));
$dataLabel = $this->_chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue();
$seriesPlot->SetColor(self::$_colourSet[self::$_plotColour++]);
if ($radarStyle == 'filled') {
$seriesPlot->SetFillColor(self::$_colourSet[self::$_plotColour]);
}
$this->_formatPointMarker($seriesPlot, $marker);
$seriesPlot->SetLegend($dataLabel);
$this->_graph->Add($seriesPlot);
}
}
示例3: RadarPlot
$graph->SetCenter(0.5, 0.55);
// Note: Enabling this results in a very noticable slow
// down of the image generation! And more load on your
// server.
$graph->img->SetAntiAliasing();
// 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, 14);
$graph->axis->title->SetColor('darkred:0.8');
// Use blue axis
$graph->axis->SetColor('blue');
$plot = new RadarPlot($data);
$plot->SetLineWeight(1);
$plot->SetColor('forestgreen');
$plot->SetFillColor('forestgreen@0.9');
$plot2 = new RadarPlot($data2);
$plot2->SetLineWeight(2);
$plot2->SetColor('red');
$plot2->SetFillColor('red@0.9');
// Add the plot and display the graph
$graph->Add($plot);
$graph->Add($plot2);
$graph->Stroke();
?>
示例4: array
<?php
// content="text/plain; charset=utf-8"
require_once 'jpgraph/jpgraph.php';
require_once 'jpgraph/jpgraph_radar.php';
// Some data to plot
$data = array(55, 80, 46, 71, 95);
// Create the graph and the plot
$graph = new RadarGraph(250, 200);
// Create the titles for the axis
$titles = $gDateLocale->GetShortMonth();
$graph->SetTitles($titles);
$plot = new RadarPlot($data);
$plot->SetFillColor('lightblue');
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
示例5: print_graph
//.........这里部分代码省略.........
$p1->SetSize($psize);
$p1->SetCenter($pposx, $pposy);
if ($labels[0]) {
$graph->subtitle->Set($labels[0]);
$graph->subtitle->SetMargin(10 * $k);
$graph->subtitle->SetFont(FF_USERFONT, FS_BOLD, 11 * $k);
$graph->subtitle->SetColor("black");
}
$graph->Add($p1);
} else {
if ($type == 'radar') {
$graph->SetSize($psize);
$graph->SetPos($pposx, $pposy);
$graph->SetTitles($legends);
// labels each axis
$graph->axis->title->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
$graph->axis->title->SetMargin(5 * $k);
$graph->axis->SetWeight(1 * $k);
$graph->axis->HideLabels();
$graph->axis->SetFont(FF_USERFONT, FS_NORMAL, 6 * $k);
$graph->HideTickMarks();
$group = array();
foreach ($data as $series => $dat) {
$rdata = array();
foreach ($data[$series] as $row) {
$rdata[] = $row;
}
if (count($rdata) < 3) {
die("ERROR::Graph::Cannot create a Radar Plot with less than 3 data points.");
}
// Create the radar plot
$bplot = new RadarPlot($rdata);
$bplot->mark->SetType($markers[$series]);
$bplot->mark->SetFillColor($colours[$series]);
$bplot->mark->SetWidth(3 * $k);
$bplot->SetColor($colours[$series]);
if ($series == 0) {
$bplot->SetFillColor('lightred');
} else {
$bplot->SetFill(false);
}
$bplot->SetLineWeight(1 * $k);
$bplot->SetLegend($labels[$series]);
if ($bandw) {
$bplot->SetShadow("gray5");
}
$graph->Add($bplot);
}
} else {
if ($type == 'line') {
// Setup the graph.
$graph->img->SetMargin($pml * $k, $pmr * $k, $pmt * $k, $pmb * $k);
// LRTB
$graph->SetScale($axes);
$graph->yaxis->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
if ($ylabel) {
$graph->yaxis->title->SetFont(FF_USERFONT, FS_NORMAL, 8 * $k);
$graph->yaxis->SetTitle($ylabel, 'middle');
$graph->yaxis->SetTitleMargin($yaxislblmargin * $k);
}
$graph->yaxis->SetLabelMargin(4 * $k);
if ($percent || $show_percent) {
$graph->yaxis->SetLabelFormat('%d%%');
}
// Percent
// Show 0 label on Y-axis (default is not to show)
示例6: array
<?php
include "../jpgraph.php";
include "../jpgraph_radar.php";
// Some data to plot
$data = array(55, 80, 46, 71, 95);
// Create the graph and the plot
$graph = new RadarGraph(300, 200, "auto");
$graph->title->Set('Weekly goals');
$graph->subtitle->Set('Year 2003');
$plot = new RadarPlot($data);
$plot->SetFillColor('lightred');
$graph->SetSize(0.6);
$graph->SetPos(0.5, 0.6);
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
示例7: makeRadarPlot
/**
*
* Utiliza lib jpgraph
*
* @param type $arrCriteria
* @param type $arrRadarData
* @param type $arrTabulation
* @param type $arrPunctuation
* @param type $dirName
* @return boolean|string
*/
public function makeRadarPlot($arrCriteria, $arrRadarData, $arrTabulation, $arrPunctuation, $dirName)
{
// content="text/plain; charset=utf-8"
require_once APPLICATION_PATH_LIBS . '/jpgraph/src/jpgraph.php';
require_once APPLICATION_PATH_LIBS . '/jpgraph/src/jpgraph_radar.php';
$criterios = array();
foreach ($arrCriteria as $chave => $valor) {
$criterios[$chave] = utf8_decode(" " . $chave . " - " . $valor);
}
if (!is_array($arrRadarData)) {
return false;
}
$titles = array_values($criterios);
$data = array_values($arrRadarData);
$graph = new RadarGraph(635, 355);
$graph->SetShadow();
$graph->SetScale('lin', $aYMin = 0, $aYMax = 100);
$graph->yscale->ticks->Set(50, 10);
$graph->title->Set("Porcentagem de acertos por Critério");
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12);
//$graph->subtitle->Set("Pontuação por Critério em %");
//$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10);
$graph->SetTitles($titles);
$graph->SetCenter(0.5, 0.54);
//$graph->HideTickMarks();
$graph->ShowMinorTickMArks();
$graph->SetColor('white');
$graph->grid->SetLineStyle('dashed');
$graph->axis->SetColor('darkgray@0.3');
$graph->grid->SetColor('darkgray@0.3');
$graph->grid->Show();
$graph->SetGridDepth(DEPTH_BACK);
$plot = new RadarPlot($data);
$plot->SetColor('red@0.2');
$plot->SetLineWeight(3);
$plot->SetFillColor('skyblue4@0.7');
$graph->Add($plot);
$radarPath = $dirName . "radarTMP.png";
$graph->Stroke($radarPath);
return $radarPath;
}
示例8: radarGraph_1
public function radarGraph_1($data, $titles, $examinee_id)
{
require_once '../app/classes/jpgraph/jpgraph_radar.php';
require_once '../app/classes/jpgraph/jpgraph_iconplot.php';
$graph = new RadarGraph(300, 255);
$graph->SetTitles($titles);
$graph->SetCenter(0.5, 0.55);
$graph->HideTickMarks();
$graph->SetColor('white@0.7');
$graph->axis->SetColor('darkgray');
$graph->grid->SetColor('darkgray');
$graph->grid->Show();
$graph->axis->title->SetFont(FF_CHINESE, FS_NORMAL, 10);
$graph->axis->title->SetMargin(5);
$graph->SetGridDepth(DEPTH_BACK);
$graph->SetSize(0.6);
$plot = new RadarPlot($data);
$plot->SetColor('deepskyblue');
$plot->SetLineWeight(1);
$plot->SetFillColor('deepskyblue@0.5');
//$plot->mark->SetType(MARK_IMG_SBALL,'red');
$graph->Add($plot);
//临时文件命名规范 $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;
}
示例9: makeRadarPlot
/**
*
*
* @param type $arrCriteria
* @param type $arrRadarData
* @param type $arrTabulation
* @param type $arrPunctuation
* @param type $dirName
* @return boolean|string
*/
public function makeRadarPlot($arrCriteria, $arrRadarData, $arrTabulation, $arrPunctuation, $dirName, $strCiclo)
{
// var_dump('arrCriteria: ',$arrCriteria);
// echo "<br><br>";
//var_dump('arrRadarData: ',$arrRadarData);
//echo "<br><br>";
// var_dump('arrTabulation: ',$arrTabulation);
// echo "<br><br>";
// var_dump('arrPunctuation: ',$arrPunctuation);
//
// //exit;
// content="text/plain; charset=utf-8"
require_once APPLICATION_PATH_LIBS . '/jpgraph/src/jpgraph.php';
require_once APPLICATION_PATH_LIBS . '/jpgraph/src/jpgraph_radar.php';
$criterios = array();
$criterios[1] = utf8_decode($arrCriteria[1]);
$criterios[8] = utf8_decode($arrCriteria[8]);
$criterios[7] = utf8_decode($arrCriteria[7]);
$criterios[6] = utf8_decode($arrCriteria[6]);
$criterios[5] = utf8_decode($arrCriteria[5]);
$criterios[4] = utf8_decode($arrCriteria[4]);
$criterios[3] = utf8_decode($arrCriteria[3]);
$criterios[2] = utf8_decode($arrCriteria[2]);
//var_dump('criterios: ', $criterios);
//echo "<br><br>";
if (!is_array($arrRadarData)) {
return false;
}
//mudanca de ultima hora para alterar o sentido no print do radar na devolutiva.
//nao ha um metodo na lib jpgraph que altere o sentido de rotacao ao printar o grafico radar.
$arrRadarDataMartelada = array();
$arrRadarDataMartelada[1] = $arrRadarData[1];
$arrRadarDataMartelada[8] = $arrRadarData[8];
$arrRadarDataMartelada[7] = $arrRadarData[7];
$arrRadarDataMartelada[6] = $arrRadarData[6];
$arrRadarDataMartelada[5] = $arrRadarData[5];
$arrRadarDataMartelada[4] = $arrRadarData[4];
$arrRadarDataMartelada[3] = $arrRadarData[3];
$arrRadarDataMartelada[2] = $arrRadarData[2];
$titles = array_values($criterios);
//$data = array_values($arrRadarData);
//implementa martelada
$data = array_values($arrRadarDataMartelada);
//var_dump('arrRadarDataMartelada', $arrRadarDataMartelada);
//echo "<br><br>";
//var_dump('data', $data);
$this->setArrCriteria($arrCriteria);
$this->setArrPunctuation($arrPunctuation);
$this->setArrRadarData($arrRadarData);
$this->setArrTabulation($arrTabulation);
$graph = new RadarGraph(635, 355);
$graph->SetShadow();
$graph->SetScale('lin', $aYMin = 0, $aYMax = 100);
$graph->yscale->ticks->Set(50, 10);
//$graph->title->Set("Porcentagem de acertos por Critério");
$programaTipo = Zend_Registry::get('programaTipo');
$strCiclo = $programaTipo != 'MpeBrasil' ? '' : ' Ciclo ' . $strCiclo;
$tituloCiclo = "Desempenho da Empresa" . $strCiclo;
$graph->title->Set($tituloCiclo);
$graph->title->SetFont(FF_VERDANA, FS_NORMAL, 12);
//$graph->subtitle->Set("Pontuação por Critério em %");
//$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10);
$graph->SetTitles($titles);
$graph->SetCenter(0.5, 0.54);
//$graph->HideTickMarks();
$graph->ShowMinorTickMArks();
$graph->SetColor('white');
$graph->grid->SetLineStyle('dashed');
$graph->axis->SetColor('darkgray@0.3');
$graph->grid->SetColor('darkgray@0.3');
$graph->grid->Show();
$graph->SetGridDepth(DEPTH_BACK);
$plot = new RadarPlot($data);
$plot->SetColor('red@0.2');
$plot->SetLineWeight(3);
$plot->SetFillColor('skyblue4@0.7');
$graph->Add($plot);
$radarPath = $dirName . "radarTMP.png";
$graph->Stroke($radarPath);
return $radarPath;
}
示例10: RadarGraph
require_once __DIR__ . '/../../include/jpgraph/jpgraph.php';
require_once __DIR__ . '/../../include/jpgraph/jpgraph_radar.php';
$graph = new RadarGraph(300, 250);
$graph->SetScale('lin', 5, 17);
//$graph->yscale->ticks->Set(25,5);
$graph->SetColor('#D5D5BD');
$graph->SetCenter(0.5, 0.5);
$graph->axis->HideTicks();
$graph->axis->HideLAbels();
$graph->axis->SetColor("#3E404F");
$graph->SetFrame(true, '#3E404F', 1);
// Uncomment the following lines to also show grid lines.
$graph->grid->SetLineStyle('dashed');
$graph->grid->SetColor('#3E404F');
$graph->grid->Show();
//$graph->ShowMinorTickMarks();
$titles = array();
$datas = array();
foreach ($_GET as $key => $value) {
$titles[] = $key;
$datas[] = $value;
}
$graph->SetTitles($titles);
$plot = new RadarPlot($datas);
//$plot->SetLegend('Goal');
$plot->SetColor('#900000', 'lightred');
$plot->SetFillColor('#E7E7D2');
$plot->SetLineWeight(2);
$graph->Add($plot);
$graph->Stroke();
示例11: RadarPlot
$graph->SetColor($background);
$graph->grid->SetColor('darkgray');
$graph->grid->Show();
$graph->axis->title->SetMargin(5);
$graph->SetGridDepth(DEPTH_BACK);
$graph->SetSize(0.6);
$plot = new RadarPlot($data['values']);
$color = $options['graph_color'];
$plot->SetColor($color);
$plot->SetLineWeight(1);
$plot->mark->SetType(MARK_IMG_SBALL, 'red');
if (!empty($options['graph_point_legend'])) {
$plot->SetLegend($options['graph_point_legend']);
}
if (!empty($options['graph_radar_fill'])) {
$plot->SetFillColor($color);
}
/*
// Todo: Add the possibility to add multiple graphs into one radar, they look nifty.
// Uncomment the lines below if you want to see it (number of $data2 && $data3 array elements must match those of the provided data.
$data2 = array(45,44,90,20,140);
$data3 = array(23,34,45,8,97);
$plot2 = new RadarPlot($data2);
$plot2->SetColor('red@0.4');
$plot2->SetLineWeight(1);
$plot2->SetLegend("Goal 2008");
$plot2->SetFillColor('blue@0.7');
$plot3 = new RadarPlot($data3);