source: trunk/web/addons/job_monarch/lib/pchart/Example13.php

Last change on this file was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 1008 bytes
Line 
1<?php
2 /*
3     Example13: A 2D exploded pie graph
4 */
5
6 // Standard inclusions   
7 include("pChart/pData.class");
8 include("pChart/pChart.class");
9
10 // Dataset definition
11 $DataSet = new pData;
12 $DataSet->AddPoint(array(10,2,3,5,3),"Serie1");
13 $DataSet->AddPoint(array("Jan","Feb","Mar","Apr","May"),"Serie2");
14 $DataSet->AddAllSeries();
15 $DataSet->SetAbsciseLabelSerie("Serie2");
16
17 // Initialise the graph
18 $Test = new pChart(300,200);
19 $Test->setFontProperties("Fonts/tahoma.ttf",8);
20 $Test->drawFilledRoundedRectangle(7,7,293,193,5,240,240,240);
21 $Test->drawRoundedRectangle(5,5,295,195,5,230,230,230);
22
23 // Draw the pie chart
24 $Test->AntialiasQuality = 0;
25 $Test->setShadowProperties(2,2,200,200,200);
26 $Test->drawFlatPieGraphWithShadow($DataSet->GetData(),$DataSet->GetDataDescription(),120,100,60,PIE_PERCENTAGE,8);
27 $Test->clearShadow();
28
29 $Test->drawPieLegend(230,15,$DataSet->GetData(),$DataSet->GetDataDescription(),250,250,250);
30
31 $Test->Render("example13.png");
32?>
Note: See TracBrowser for help on using the repository browser.