ดูcode ให้หน่อยครับให้กราฟ Show แค่ 6 ค่า จะให้แกน x show แค่ 6 ค่าแก้ตรงไหนครับ
จะให้แกนx show แค่6ค่าแก้ตรงไหนครับ
<?
if (!$getww) $getww=$ww;
?>
<input name="getww" type="text" id="ww" value="<?=$getww;?>"></td>
</tr>
<tr>
<td align="right" class="white">MC</td>
<td><?
$db_name = 'product';
include('../../include/dbconnect.php');
$results_mc = mysql_query("SELECT * FROM tblmc");
?>
<select name="mc">
<option>
<?=$mc;?>
</option>
<?
while ($data_mc = mysql_fetch_array($results_mc))
{
?>
<option>
<?=$data_mc["mc"]?>
</option>
<? } ?>
</select></td>
</tr>
<tr>
<td align="right" class="white">Year</td>
<td>
<select name="sel_year">
<option><?=$sel_year;?></option>
<option><?=date("y",mktime(date("h"),date("i"),date("s"),date("m"),date("d"),date("y")+1));?></option>
<option><?=date("y",time());?></option>
</select></td>
</tr>
<tr>
<td align="right" class="white"> </td>
<td><input name="view" type="submit" id="view" value="View"></td>
</tr>
</table>
</form> </td>
<td colspan="4">
<form name="frmDataEntry" id="frmDataEntry" method="post" action="save.php" onSubmit="return checkvalue()" >
<table width="100%" cellspacing="0">
<tr>
<td width="14%" align="right" class="white">EN.</td>
<td width="12%"><input name="en" type="text" id="en" maxlength="6"></td>
<td width="14%" align="right" class="white">TEMP</td>
<td width="12%"><input name="spcTemp" type="text" id="spcTemp" maxlength="3"></td>
<td width="48%"> </td>
</tr>
<tr>
<td align="right" class="white">SO / Batch #</td>
<td><input name="so" type="text" id="so"></td>
<td align="right" class="white">PRESSURE</td>
<td><input name="spcPressur" type="text" id="spcPressur" maxlength="2"></td>
<td> </td>
</tr>
<tr>
<td align="right" class="white">MIN</td>
<td><input name="spcMin" type="text" id="spcMin" maxlength="4"></td>
<td align="right" class="white">Out of UCL</td>
<td align="right"><span class="redBox">2</span></td>
<td> </td>
</tr>
<tr>
<td align="right" class="white">MEAN</td>
<td><input name="spcMean" type="text" id="spcMean" maxlength="4"></td>
<td align="right" class="white">Out of LCL</td>
<td align="right"><span class="redBox">1</span></td>
<td> </td>
</tr>
<tr>
<td align="right" class="white">MAX</td>
<td><input name="spcMax" type="text" id="spcMax" maxlength="4">
<input name="spcMc" type="hidden" id="spcMc" value="<?=$mc;?>"> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Save"></td>
<td> </td>
</tr>
</table>
</form>
</td>
</tr>
</table></td>
</tr>
</table>
<div class="spcHeader">MIPT TR Active Statistic Process Control</div>
<div class="nf" align="center">
<? //----------------------------------------
$db_name = 'mychart';
if (!(@mysql_select_db($db_name)))
{
echo("<p>Unable to locate the $db_name database.</p>");
exit();
}
//----------------------------------
$year = date("y",time())+1;
if (strlen($year)==1) $year="0$year";
if (!$sel_year) $sel_year = $year;
if (!$mc) $mc=48;
$results = mysql_query("SELECT * FROM tblspc where (ww like '%$getww') AND (mc like '%$mc') AND (qyear like '%$sel_year') order by id asc");
$numrows = mysql_num_rows($results);
if ($numrows==0) {
echo("<p>No Data found</p>");
exit();
}
?></div>
<div class="spcChart">
<?
include("../Includes/FusionCharts.php");
$strXML = "<graph bgcolor='000000' caption='' numberPrefix='' formatNumberScale='0' rotateValues='1' decimalPrecision='2' rotateNames='1' showValues='0' yaxismaxvalue='80' yaxisminvalue='10' canvasBgColor='000066' canvasBorderColor='FFFFFF' chartTopMargin='30' chartLeftMargin='20' chartRightMargin='30' divlinecolor='FFFFFF' divLineThickness='1' baseFontColor='000000' outCnvBaseFontColor='FFFFFF' numdivlines='6' showShadow='0' >";
$strCategories = "<categories>";
$strDataPrev = "<dataset seriesName='SPC#$mc' color='FF9900' anchorBorderColor='FFFFFF' anchorBgColor='FF8000' anchorSides='4' lineThickness='2' >";
while ($data = mysql_fetch_array($results))
{
$strCategories .= "<category name='" . $data['so'] . "' />";
$strDataPrev .= "<set value='" . $data['spcmean'] . "' />";
}
$strCategories .= "</categories>";
$strDataPrev .= "</dataset>";
$strDataucl = "<trendlines>";
$strDataucl .= "<line startValue='70' color='66cc33' displayValue='UCL' thickness='2' showOnTop='1'/>";
$strDataucl .= "</trendlines>";
$strDatalcl = "<trendlines>";
$strDatalcl .= "<line startValue='25' color='FF6600' displayValue='LCL' thickness='2' showOnTop='1'/>";
$strDatalcl .= "</trendlines>";
$strXML .= $strCategories . $strDataPrev . $strDataucl . $strDatalcl . "</graph>";
echo renderChartHTML("../Charts/FCF_MSLine.swf", "", $strXML, "myNext", 1200, 550, false);
?>
</div>
<br><br>
</div>
</body>
</html>
picture [/img]Tag : - - - -
Date :
2009-08-04 18:51:43
By :
pongsatorn06
View :
1190
Reply :
3
แสดงแค่ 6 ค่าก็เอาใส่แค่ 6 สิครับ( limit 6 )
ว่าแต่ใช้ graph อะไร หรูดีแฮะ
Date :
2009-08-04 20:13:33
By :
pjgunner
ให้showทีละ6ค่าน่ะครับแล้วlimit6ต้องแทรกตรงไหนคับ
Date :
2009-08-05 11:06:32
By :
pong
Load balance : Server 05