$xaxisfontstyle = derive_request_item("xaxisfontstyle", "Normal");
$xaxisfontsize = derive_request_item("xaxisfontsize", 12);
$yticklabint = derive_request_item("yticklabint", 2);
$yaxisfont = derive_request_item("yaxisfont", "Arial");
$yaxisfontstyle = derive_request_item("yaxisfontstyle", "Normal");
$yaxisfontsize = derive_request_item("yaxisfontsize", 12);
$val = derive_request_item("xlabels", "");
$xlabels = explode(",", $val);
$v = 0;
while (true) {
    $vval = "plotdata" . $v;
    $plottype = derive_request_item("plottype" . $v, "LINE");
    $plotlcolor = derive_request_item("plotlinecolor" . $v, "");
    $plotfcolor = derive_request_item("plotfillcolor" . $v, "");
    $plotlegend = derive_request_item("plotlegend" . $v, "");
    $plotname = derive_request_item("plotname" . $v, "");
    if (array_key_exists("{$vval}", $_REQUEST)) {
        $vals = explode(",", $_REQUEST["{$vval}"]);
        $plot[$v] = array("name" => $plotname, "type" => $plottype, "fillcolor" => $plotfcolor, "linecolor" => $plotlcolor, "legend" => $plotlegend, "data" => $vals);
    } else {
        break;
    }
    $v++;
}
/*
// Create the correct type of graph. 
if ( $plot[0]["type"] == "PIE" || $plot[0]["type"] == "PIE3D" )
{
	$graph = new PieGraph($width,$height,"auto");	
	$graph->SetScale("textlin");
Esempio n. 2
0
$xaxisfont = derive_request_item("xaxisfont", "Arial");
$xaxisfontstyle = derive_request_item("xaxisfontstyle", "Normal");
$xaxisfontsize = derive_request_item("xaxisfontsize", 12);
$yticklabint = derive_request_item("yticklabint", 2);
$yaxisfont = derive_request_item("yaxisfont", "Arial");
$yaxisfontstyle = derive_request_item("yaxisfontstyle", "Normal");
$yaxisfontsize = derive_request_item("yaxisfontsize", 12);
$val = derive_request_item("xlabels", "");
$xlabels = explode(",", $val);
$v = 0;
while (true) {
    $vval = "plotdata" . $v;
    $plottype = derive_request_item("plottype" . $v, "LINE");
    $plotlcolor = derive_request_item("plotlinecolor" . $v, "black");
    $plotfcolor = derive_request_item("plotfillcolor" . $v, "");
    $plotlegend = derive_request_item("plotlegend" . $v, "");
    if (array_key_exists("{$vval}", $_REQUEST)) {
        $vals = explode(",", $_REQUEST["{$vval}"]);
        $plot[$v] = array("type" => $plottype, "fillcolor" => $plotfcolor, "linecolor" => $plotlcolor, "legend" => $plotlegend, "data" => $vals);
    } else {
        break;
    }
    $v++;
}
// Create the correct type of graph.
if ($plot[0]["type"] == "PIE" || $plot[0]["type"] == "PIE3D") {
    $graph = new PieGraph($width, $height, "auto");
    $graph->SetScale("textlin");
    $graph->img->SetMargin($marginleft, $marginright, $margintop, $marginbottom);
    $graph->SetMarginColor($margincolor);
    $graph->img->SetAntiAliasing();