Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php fusionchart不显示图形_Php_Mysql_Dreamweaver_Fusioncharts - Fatal编程技术网

Php fusionchart不显示图形

Php fusionchart不显示图形,php,mysql,dreamweaver,fusioncharts,Php,Mysql,Dreamweaver,Fusioncharts,我想知道为什么我的图表不起作用。我完全按照描述的那样做了。我正试图把“日期”和“高峰世代”对立起来。但当代码运行时,它会给出一条“无数据显示”消息。可以做些什么来解决这个问题 <?php //We've included ../Includes/FusionCharts.php and ../Includes/DBConn.php, which contains //functions to help us easily embed the charts and connect

我想知道为什么我的图表不起作用。我完全按照描述的那样做了。我正试图把“日期”和“高峰世代”对立起来。但当代码运行时,它会给出一条“无数据显示”消息。可以做些什么来解决这个问题

<?php
//We've included ../Includes/FusionCharts.php and ../Includes/DBConn.php,      which contains
//functions to help us easily embed the charts and connect to a database.
include("Includes/FusionCharts.php");
include("Includes/DBConn.php");
?>
<HTML>
<HEAD>
<TITLE>
FusionCharts Free - Database Example
</TITLE>
<?php
//You need to include the following JS file, if you intend to embed the chart using JavaScript.
//Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer
//When you make your own charts, make sure that the path to this JS file is correct. Else, you would get JavaScript errors.
?>  
<SCRIPT LANGUAGE="Javascript" SRC="js/FusionCharts.js"></SCRIPT>
<style type="text/css">
<!--
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
.text{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
-->
</style>
</HEAD>
<BODY>

<CENTER>
<h2><a href="http://www.fusioncharts.com" target="_blank">FusionCharts   Free</a> -Database and Drill-Down Example</h2>


<?php
//In this example, we show how to connect FusionCharts to a database.
//For the sake of ease, we've used an MySQL databases containing two
//tables.

// Connect to the DB
$link = connectToDB();


// Fetch all factory records

//Iterate through each factory
//if ($result) {
    //
        //Now create a query to get details for this output
        $strQuery = "select SUM(peak_generation) as TotOutput, date as DAYS FROM daily_output GROUP BY date";
        $result = mysql_query($strQuery) or die(mysql_error()); 

        $strXML = "<chart caption='Annual Revenue - last 3 years' numberPrefix='$'>";
        while($row = mysql_fetch_array($result)) {
        //Generate <set name='..' value='..' />        
        $strXML .= "<set label = '".$row['DAYS']."' value = '".$row['TotOutput']."' />";
        }
        //Finally, close <graph> element
        $strXML .= "</chart>";
        //Create the chart - Pie 3D Chart with data from $strXML
        //echo renderChart("charts/FCF_Column3D.swf", "", $strXML, "FactorySum", 650, 450);
        echo renderChart("charts/FCF_Column3D.swf", "", $strXML, "annual_revenue", 600, 300);


        //free the resultset
        mysql_free_result($result);
//  }
//  }




    mysql_close($link);
?>




<BR><BR>
<a href='../NoChart.html' target="_blank">Unable to see the chart above?</a>
<H5 ><a href='../default.htm'>&laquo; Back to list of examples</a></h5>
</CENTER>
</BODY>
</HTML>




请注意,如果正在使用FusionCharts Free,请将
修改为