Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Contoh Statistik</title>
- </head>
- <body>
- <?php
- require("./FusionChart/Code/PHP/Includes/FusionCharts.php");
- require("./adodb.inc.php");
- $color=array();
- $color[]='AFD8F8';
- $color[]='F6BD0F';
- $color[]='8BBA00';
- $color[]='008E46';
- $color[]='D64646';
- $color[]='A186BE';
- #$gid=$_GET["gid"];
- $conn=&ADONewConnection('postgres');
- $conn->Connect('localhost','postgres','1234','pendidikan');
- $strXML="<graph caption='Jumlah Bangunan Sekolah per Kecamatan Bogor'>";
- $strXML.="xAxisName='Tingkat Sekolah' yAxisName='Jumlah Bangunan Sekolah'";
- $strXML.="decimalPrecision='0' formatNumberScale='0'>";
- $recordSet=&$conn->Execute('select kecamatan, jum_sd from t_sd');
- if(!$recordSet){
- print $conn->ErrorMsg();
- }
- else{
- $i=0;
- $lc=sizeof($color);
- while(!$recordSet->EOF){
- $strXML.="<set name='".$recordSet->fields[1]."' value='".$recordSet->fields[3]."' color='".$color='".$color[$i % $lc]."'"/>";
- $recordSet->MoveNext();
- $i++;
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement