ImageGraph Pie chart issue after update to 1.8.4

Hi there,

from the call “/?module=API&method=ImageGraph.get&idSite=12&apiModule=UserSettings&apiAction=getOS&graphType=3dPie&period=month&date=today&width=400&height=250&column=nb_visits&colors=FFFF00,00FF00,FF0000,0000FF,555555,C3590D”

I got the pie-chart with version 1.8.3 but now after updating to 1.8.4 I get
"Fatal error: Call to undefined method Piwik_ImageGraph_StaticGraph_3DPie::maxWidthHeight() in /piwik/plugins/ImageGraph/StaticGraph/PieGraph.php on line 69"

Any Ideas?

Thanks!

Thanks for the bug report!

Could you try the following patch :


--- plugins/ImageGraph/StaticGraph/PieGraph.php	(revision 7005)
+++ plugins/ImageGraph/StaticGraph/PieGraph.php	(revision )
@@ -66,10 +66,9 @@
 		}
 
 		// max abscissa label width is used to set the pie right margin
-		$abscissaMaxWidthHeight = $this->maxWidthHeight($this->abscissaSeries);
-		$maxAbscissaLabelWidth = $abscissaMaxWidthHeight[self::WIDTH_KEY];
+		list($abscissaMaxWidth, $abscissaMaxHeight) = $this->getMaximumTextWidthHeight($this->abscissaSeries);
 
-		$this->xPosition = $this->width - $radius - $maxAbscissaLabelWidth - self::PIE_RIGHT_MARGIN;
+		$this->xPosition = $this->width - $radius - $abscissaMaxWidth - self::PIE_RIGHT_MARGIN;
 		$this->yPosition = $this->height / 2;
 
 		if ($showLegend)

Cheers

It works like a charm, thanks for fixing!!!

cheers

Patch applied in http://dev.piwik.org/trac/changeset/7009

Thanks for testing!