【发布时间】:2014-02-26 15:31:16
【问题描述】:
draw3DPie 方法只允许我定位图形,而不是定义大小。 如果我定义一个更大的图像(pImage),只有图表的背景会增加。 我怎样才能得到更大的馅饼?
【问题讨论】:
draw3DPie 方法只允许我定位图形,而不是定义大小。 如果我定义一个更大的图像(pImage),只有图表的背景会增加。 我怎样才能得到更大的馅饼?
【问题讨论】:
$PieChart->draw3DPie(150,100,
array("Radius"=>80,
"DrawLabels"=>TRUE,"DataGapAngle"=>10,
"DataGapRadius"=>6,"Border"=>TRUE));
"Radius"=>80
改变数字来调整大小
感谢 stlfan
【讨论】:
首先您必须调整 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.
【讨论】: