【问题标题】:How to increase pie size in pChart如何在 pChart 中增加饼图大小
【发布时间】:2014-02-26 15:31:16
【问题描述】:

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

【问题讨论】:

    标签: php pchart


    【解决方案1】:
    $PieChart->draw3DPie(150,100,
                       array("Radius"=>80,
                      "DrawLabels"=>TRUE,"DataGapAngle"=>10,
                      "DataGapRadius"=>6,"Border"=>TRUE));
    
    "Radius"=>80
    

    改变数字来调整大小

    感谢 stlfan

    【讨论】:

      【解决方案2】:

      首先您必须调整 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.
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-08-29
        • 1970-01-01
        • 1970-01-01
        • 2019-08-05
        • 1970-01-01
        • 2017-12-15
        相关资源
        最近更新 更多