summaryrefslogtreecommitdiffstats
path: root/notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php
diff options
context:
space:
mode:
Diffstat (limited to 'notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php')
-rw-r--r--notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php b/notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php
new file mode 100644
index 0000000..b96f8f6
--- /dev/null
+++ b/notFinishedCode/pChart2.1.2/examples/example.draw3DPie.transparent.php
@@ -0,0 +1,40 @@
+<?php
+ /* CAT:Pie charts */
+
+ /* pChart library inclusions */
+ include("../class/pData.class.php");
+ include("../class/pDraw.class.php");
+ include("../class/pPie.class.php");
+ include("../class/pImage.class.php");
+
+ /* Create and populate the pData object */
+ $MyData = new pData();
+ $MyData->addPoints(array(40,30,20),"ScoreA");
+ $MyData->setSerieDescription("ScoreA","Application A");
+
+ /* Define the absissa serie */
+ $MyData->addPoints(array("A","B","C"),"Labels");
+ $MyData->setAbscissa("Labels");
+
+ /* Create the pChart object */
+ $myPicture = new pImage(240,180,$MyData,TRUE);
+
+ /* Set the default font properties */
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>10,"R"=>80,"G"=>80,"B"=>80));
+
+ /* Create the pPie object */
+ $PieChart = new pPie($myPicture,$MyData);
+
+ /* Enable shadow computing */
+ $myPicture->setShadow(TRUE,array("X"=>3,"Y"=>3,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
+
+ /* Draw a splitted pie chart */
+ $PieChart->draw3DPie(120,90,array("Radius"=>100,"DataGapAngle"=>12,"DataGapRadius"=>10,"Border"=>TRUE));
+
+ /* Write the legend box */
+ $myPicture->setFontProperties(array("FontName"=>"../fonts/Silkscreen.ttf","FontSize"=>6,"R"=>0,"G"=>0,"B"=>0));
+ $PieChart->drawPieLegend(140,160,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
+
+ /* Render the picture (choose the best way) */
+ $myPicture->autoOutput("pictures/example.draw3DPie.transparent.png");
+?> \ No newline at end of file