source: trunk/web/addons/job_monarch/lib/pchart/SmallGraph.php @ 619

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

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 909 bytes
Line 
1<?php
2 /*
3     SmallGraph: Let's go fast, draw small!
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(1,4,-3,2,-3,3,2,1,0,7,4,-3,2,-3,3,5,1,0,7),"Serie1");
13 $DataSet->AddAllSeries();
14 $DataSet->SetAbsciseLabelSerie();
15 $DataSet->SetSerieName("January","Serie1");
16
17 // Initialise the graph
18 $Test = new pChart(100,30);
19 $Test->setFontProperties("Fonts/tahoma.ttf",8);
20 $Test->drawFilledRoundedRectangle(2,2,98,28,2,230,230,230);
21 $Test->setGraphArea(5,5,95,25);
22 $Test->drawGraphArea(255,255,255);
23 $Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,220,220,220,FALSE);
24
25 // Draw the line graph
26 $Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription());
27
28 // Finish the graph
29 $Test->Render("SmallGraph.png");
30?>
Note: See TracBrowser for help on using the repository browser.