|
|
|
ตอนนี้ดึงข้อมูล มาได้ แล้ว ครับ แต่ รูปกราฟไม่ขึ้น ครับ ดูให้ที ครับ |
|
|
|
|
|
|
|
Code (PHP)
<?php
$host="localhost";
$user="root";//jib999
$pass="12345";//jibxtranet999*
$dbname="data_set";
$conn=mysql_connect($host,$user,$pass) or die (mysql_error());
mysql_select_db($dbname) or die (mysql_error());
mysql_query("SET NAMES UTF8");
$strXML = '<?xml version="1.0" encoding="UTF-8"?>';
$strXML .= "<graph numdivlines='4' lineThickness='3' showValues='0' numVDivLines='10' formatNumberScale='1' rotateNames='1' decimalPrecision='1' anchorRadius='2' anchorBgAlpha='0' numberPrefix='$' divLineAlpha='30' showAlternateHGridColor='1' yAxisMinValue='800000' shadowAlpha='50' >";
//--- query value ------
$sql = "select * FROM ......";
$query = mysql_query($sql);
while($record = mysql_fetch_array($query))
{
$strXML .= '<categories >' . $record['Mydate'] . '</categories >';
$strXML .= "<dataset seriesName='Current Year' color='A66EDD' anchorBorderColor='A66EDD' anchorRadius='4'>" . $record['count_amt'] . '</dataset>';
}
$strXML .= '</graph>';
//echo $strXML ;
echo FusionCharts("Charts/FCF_MSLine.swf", "", $strXML, "numdivlines", 600, 300, false, false);
?>
Tag : PHP, HTML/CSS, JavaScript, Action Script, Ajax, jQuery
|
|
|
|
|
|
Date :
2013-12-09 13:45:34 |
By :
JACK |
View :
705 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function FusionCharts นี้เป็น javascript หรือเปล่าครับ ถ้าใช่ก็ควรต้องใส่
Code (PHP)
echo "<script type='text/javascript'>";
echo FusionCharts("Charts/FCF_MSLine.swf", "", $strXML, "numdivlines", 600, 300, false, false);
echo "</script>";
ตามนี้อะครับ
|
|
|
|
|
Date :
2013-12-09 14:19:24 |
By :
zoceferatu |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|