1

draw3DPie 方法只允许我定位图形,而不是定义大小。如果我定义一个更大的图像(pImage),只有图表的背景会增加。我怎样才能得到一个更大的馅饼?

4

2 回答 2

3
$PieChart->draw3DPie(150,100,
                   array("Radius"=>80,
                  "DrawLabels"=>TRUE,"DataGapAngle"=>10,
                  "DataGapRadius"=>6,"Border"=>TRUE));

"Radius"=>80

更改数字以调整大小

归功于 stlfan

于 2014-04-12T03:24:59.740 回答
0

首先,您必须调整 PImage 的大小,然后调整 drawFilledRectangle,然后修改饼图的半径。

//Change the first 2 values: 1024 and 720:

yPicture = new pImage(1024,720,$MyData);

//Then the 700 and 450 values:

$myPicture->drawFilledRectangle(0,0,700,450,$Settings);

//Then:

$PieChart = new pPie($myPicture,$MyData);


 $PieChart->draw3DPie(350,200,array("Radius"=>140,"DrawLabels"=>TRUE,"LabelStacked"=>TRUE,"Border"=>TRUE));

//Then the 350 and 200 are the position in the screen, the radius is the size of the pie.
于 2014-06-16T23:20:30.397 回答