我正在使用趨勢線作爲我的折線圖。但它在我的瀏覽器中是不可見的。任何人都可以告訴我這個原因。以下我給代碼:趨勢線未顯示在我的圖表中
<?php
include("Includes/FusionCharts.php");
include("Includes/DBconn.php");
include("Includes/FC_Colors.php");
?>
<html>
<title> Blood Pressure</title>
<head>
<script language="javascript" src="FusionCharts/FusionChart.js"></script>
</head>
<body>
<center>
<?php
//connect to the DB
$link= connectToDB();
$query = "select * from patient_health order by ondate";
$result=mysql_query($query)or die(mysql_error());
//echo $result;
$strXML = "<graph caption='Blood Pressure Reading' subCaption='Month wise' xaxisname='Current Month' yaxisname='Blood Pressure(Systolic/diastole)' yAxisMaxValue='400'
animation='1' rotatenames='1'>";
$categories = "<categories>";
$systolic = "<dataset seriesName='systole'>";
$diaolic = "<dataset seriesName='diastole'>";
while ($row = mysql_fetch_array($result)) {
$categories .= "<category name='" . $row["ondate"] . "' />";
$systolic .= "<set color='AFD8F8' value='" . $row["systole_reading"] . "' hoverText='systolic' />";
$diaolic .= "<set value='" . $row["diastole_reading"] . "' color='FEDCBC' hoverText='diastolic'/>";
}
$strXML .= $categories . "</categories>" . $systolic . "</dataset>" . $diaolic . "</dataset>" . "</graph>";
**$strXML .=" <trendlines>
<line startValue='140' color='91C728' displayValue='Target' showOnTop='1'/>
</trendlines>";**
//$strXML now has the complete XML required to render the multi-series chart.
//Create the chart - Pie 3D Chart with data from $strXML
echo renderChartHTML("FusionCharts/FCF_MSLine.swf", "", $strXML, "BloodPressure", 850, 450,false);
//echo renderChartHTML("FusionCharts/FCF_MSBar2D.swf", "", $strXML, "BloodPressure", 850, 450,false);
?>
</center>
</body>
</html>
我是否正確地放置了代碼或者我必須對其進行更改。任何人都可以給我解決
預先感謝您 Ramsai
嘿非常感謝你的幫助shamasis,對我來說顏色不會改變線條你知道如果所以請幫助我的原因 – ramsai 2012-04-27 06:57:09