2013-06-20 Miguel de Dios <miguel.dedios@artica.es>

* include/graphs/pChart/pPie.class.php, include/graphs/fgraph.php:
	fixed the htmlentities in the pie chart legend, the border was
	fixed for older commits.
	
	MERGED FROM THE BRANCH PANDORA_4.0




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8357 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-06-20 08:20:11 +00:00
parent 9460be66f2
commit 2c3bf6ff9a
3 changed files with 73 additions and 48 deletions

View File

@ -1,3 +1,11 @@
2013-06-20 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/pChart/pPie.class.php, include/graphs/fgraph.php:
fixed the htmlentities in the pie chart legend, the border was
fixed for older commits.
MERGED FROM THE BRANCH PANDORA_4.0
2013-06-20 Junichi Satoh <junichi@rworks.jp>
* include/help/ja/help_alerts_config.php: Added a new help.

View File

@ -465,6 +465,13 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width, $height,
// This library allows only 8 colors
$max_values = 8;
//Remove the html_entities
$temp = array();
foreach ($chart_data as $key => $value) {
$temp[io_safe_output($key)] = $value;
}
$chart_data = $temp;
if (count($chart_data) > $max_values) {
$chart_data_trunc = array();
$n = 1;

View File

@ -527,7 +527,13 @@
else
{
if ( $Border )
{ $Settings = array("R"=>$Palette[$ID]["R"]+30,"G"=>$Palette[$ID]["G"]+30,"B"=>$Palette[$ID]["B"]+30,"Alpha"=>$Palette[$ID]["Alpha"]); }
{
$Settings = array(
"R" => $Palette[$ID]["R"] + 30,
"G" => $Palette[$ID]["G"] + 30,
"B" => $Palette[$ID]["B"] + 30,
"Alpha" => $Palette[$ID]["Alpha"]);
}
else
$Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);
}
@ -549,10 +555,14 @@
$Xc = cos(($i-90)*PI/180) * $Radius + $X;
$Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y - $SliceHeight;
if ( $FirstPoint ) { $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); } { $FirstPoint = FALSE; }
if ( $FirstPoint )
{ $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); }
else
{ $FirstPoint = FALSE; }
$this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings);
if ($i < 270 && $i > 90 ) { $this->pChartObject->drawAntialiasPixel($Xc,$Yc+$SliceHeight,$Settings); }
if ($i < 270 && $i > 90 )
{ $this->pChartObject->drawAntialiasPixel($Xc,$Yc+$SliceHeight,$Settings); }
}
$this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings);