Public Member Functions | |
| SurveyChart ($GraphTyp, $XSize, $YSize, $Titel, $XLabel, $YLabel, $DataArray) | |
| makeDataForOneQuestion ($Data, $GraphTyp) | |
| draw () | |
Data Fields | |
| $graph | |
| $graphData | |
Definition at line 4 of file class.SurveyChart.php.
| SurveyChart::draw | ( | ) |
Definition at line 59 of file class.SurveyChart.php.
Referenced by SurveyChart().
{
$this->graph->DrawGraph();
$this->graph->PrintImage();
}
Here is the caller graph for this function:| SurveyChart::makeDataForOneQuestion | ( | $ | Data, | |
| $ | GraphTyp | |||
| ) |
Definition at line 36 of file class.SurveyChart.php.
Referenced by SurveyChart().
{
foreach ($Data as $value)
{
if (array_key_exists("title", $value))
{
switch ($GraphTyp)
{
case "pie":
array_push($this->graphData, array($value["title"], $value["selected"], ""));
break;
default:
array_push($this->graphData, array($value["title"], $value["selected"]));
break;
}
}
else
{
array_push($this->graphData, array($value["value"], $value["selected"]));
}
}
}
Here is the caller graph for this function:| SurveyChart::SurveyChart | ( | $ | GraphTyp, | |
| $ | XSize, | |||
| $ | YSize, | |||
| $ | Titel, | |||
| $ | XLabel, | |||
| $ | YLabel, | |||
| $ | DataArray | |||
| ) |
Definition at line 13 of file class.SurveyChart.php.
References draw(), and makeDataForOneQuestion().
{
$this->graphData = array();
$this->graph = new PHPlot($XSize,$YSize);
switch ($GraphTyp)
{
case "pie":
$this->graph->SetDataType("text-data-single");
break;
default:
$this->graph->SetDataType("text-data");
break;
}
$this->graph->SetPlotType($GraphTyp);
$this->graph->SetTitle($Titel);
$this->graph->SetXTitle($XLabel);
$this->graph->SetYTitle($YLabel);
$this->graph->SetXDataLabelPos("plotdown");
$this->makeDataForOneQuestion($DataArray, $GraphTyp);
$this->graph->SetDataValues($this->graphData);
$this->draw();
}
Here is the call graph for this function:| SurveyChart::$graph |
Definition at line 11 of file class.SurveyChart.php.
| SurveyChart::$graphData |
Definition at line 12 of file class.SurveyChart.php.
1.7.1