juniordev

Members
  • Content count

    17
  • Joined

  • Last visited

About juniordev

  • Rank
    Junior Member
  1. Hi guys i have data from SQL server and it was working and creating a linegraph before, but when i decided that i needed a scroll 2d line i thought it would be as easy as changing the data type from 'line.swf' to 'ScrollLine2d.swf' , this was NOT the case as i get a error stating ' No data to display' help me if you can guys know its probably something simple <?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("FusionCharts/FusionCharts_PHP/App/Includes/FusionCharts.php"); //include("\FusionCharts\FusionCharts_PHP\App\Includes\Connection_inc.php"); ?> <HTML> <HEAD> <TITLE>CPU MONITORING</TITLE> <script LANGUAGE="Javascript" SRC="/FusionCharts/Charts/FusionCharts.js"></SCRIPT> </HEAD> <BODY> <CENTER> <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used a MySQL database containing two //tables. //Connect to the DB $serverName = "CWIHQLA3FF813J\SQLEXPRESS"; $connectionOptions = array("Database" => "PerfMon"); $conn = sqlsrv_connect( $serverName, $connectionOptions); //$strXML will be used to store the entire XML document generated //Generate the graph element $strXML = "<chart caption='CPU History' subCaption='By Load Percentage' formatNumberScale='0' numberSuffix=' %' linethickness = '2' showvalues = '0' anchorradius = '3' anchorbgalpha = '50' numvdivlines = '24' showalternatevgridcolor = '1' alternatevgridalpha = '3' animation = '0'>"; //Fetch all factory records $queryString = "SELECT TOP 50 time, LoadPercentage FROM [PerfMon].[dbo].[CPUUsage] order by time"; $result = sqlsrv_query($conn, $queryString) or die ("Problem in executing query"); //Iterate through each factory if ($result) { while($ors = sqlsrv_fetch_array($result)) { //Generate <set name='..' value='..'/> $strXML .= "<set name='" . $ors['time'] . "' value='" . $ors['LoadPercentage'] . "' />"; } } sqlsrv_close($conn); //Finally, close <graph> element $strXML .= "</chart>"; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("FusionCharts/Charts/ScrollLine2D.swf", "", $strXML, "Load", 600, 500, false, true); ?> </BODY> </HTML>
  2. Hi guys i have data from SQL server and it was working and creating a linegraph before, but when i decided that i needed a scroll 2d line i thought it would be as easy as changing the data type from 'line.swf' to 'ScrollLine2d.swf' , this was NOT the case as i get a error stating ' No data to display' help me if you can guys know its probably something simple <?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("FusionCharts/FusionCharts_PHP/App/Includes/FusionCharts.php"); //include("\FusionCharts\FusionCharts_PHP\App\Includes\Connection_inc.php"); ?> <HTML> <HEAD> <TITLE>CPU MONITORING</TITLE> <script LANGUAGE="Javascript" SRC="/FusionCharts/Charts/FusionCharts.js"></SCRIPT> </HEAD> <BODY> <CENTER> <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used a MySQL database containing two //tables. //Connect to the DB $serverName = "CWIHQLA3FF813J\SQLEXPRESS"; $connectionOptions = array("Database" => "PerfMon"); $conn = sqlsrv_connect( $serverName, $connectionOptions); //$strXML will be used to store the entire XML document generated //Generate the graph element $strXML = "<chart caption='CPU History' subCaption='By Load Percentage' formatNumberScale='0' numberSuffix=' %' linethickness = '2' showvalues = '0' anchorradius = '3' anchorbgalpha = '50' numvdivlines = '24' showalternatevgridcolor = '1' alternatevgridalpha = '3' animation = '0'>"; //Fetch all factory records $queryString = "SELECT TOP 50 time, LoadPercentage FROM [PerfMon].[dbo].[CPUUsage] order by time"; $result = sqlsrv_query($conn, $queryString) or die ("Problem in executing query"); //Iterate through each factory if ($result) { while($ors = sqlsrv_fetch_array($result)) { //Generate <set name='..' value='..'/> $strXML .= "<set name='" . $ors['time'] . "' value='" . $ors['LoadPercentage'] . "' />"; } } sqlsrv_close($conn); //Finally, close <graph> element $strXML .= "</chart>"; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("FusionCharts/Charts/ScrollLine2D.swf", "", $strXML, "Load", 600, 500, false, true); ?> </BODY> </HTML>
  3. Php Sql Server Graph!?

    Hi i am basically trying to create a simple line graph by gathering data from SQL server, the data itself which i would like to show is, CPU Load percentage which allows me to view over a day what the CPU usage has been like in my webpage. I am using php on wamp server. and i really do not know what i am doing wrong, new to php,new to html, new to most! so would love some help from you veterans!! Really appreciate it. Basically what i am trying to achieve is when you go to task manager, the performance tab shows a CPU line graph, that is all i want! in the most simplest way! In my database i have data for LoadPercentage as you can see below which at the moment is not under any time frame, i am just using any data to have a graph working at first if you know what i mean. CHEERS GUYS (note i did not include connection inc.php) i think the coding is right but you guys will tell me wrong right! <?php include("\FusionCharts\FusionCharts_PHP\App\Includes\FusionCharts.php"); ?> <HTML> <HEAD> <TITLE>FusionCharts Free - Database Example</TITLE> <script LANGUAGE="Javascript" SRC="./FusionCharts/Charts/FusionCharts.js"></SCRIPT> </HEAD> <BODY> <CENTER> <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used a MySQL database containing two //tables. //Connect to the DB $serverName = "CWIHQLA3FF813J\SQLEXPRESS"; $connectionOptions = array("Database" => "PerfMon"); $conn = sqlsrv_connect( $serverName, $connectionOptions) or die ("<p>Problem on connecting to database</p>"); //$strXML will be used to store the entire XML document generated //Generate the graph element $strXML = "<graph caption='Factory Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>"; //Fetch all factory records $queryString = "SELECT TOP 100 LoadPercentage FROM [PerfMon].[dbo].[CPUUsage]"; $result = sqlsrv_query($conn, $queryString) or die ("Problem in executing query"); //Iterate through each factory if ($result) { while($ors = sqlsrv_fetch_array($result)) { //Generate <set name='..' value='..'/> $strXML .= "<set name='CPU Usage' value='" . $ors['LoadPercentage'] . "' />"; } } sqlsrv_close($conn); //Finally, close <graph> element $strXML .= "</graph>"; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("\FusionCharts\Charts\Line.swf", "", $strXML, "LoadPercentage", 650, 450, "", ""); ?> </BODY> </HTML>
  4. Php Sql Server Graph!?

    Hi i am basically trying to create a simple line graph by gathering data from SQL server, the data itself which i would like to show is, CPU Load percentage which allows me to view over a day what the CPU usage has been like in my webpage. I am using php on wamp server. and i really do not know what i am doing wrong, new to php,new to html, new to most! so would love some help from you veterans!! Really appreciate it. Basically what i am trying to achieve is when you go to task manager, the performance tab shows a CPU line graph, that is all i want! in the most simplest way! In my database i have data for LoadPercentage as you can see below which at the moment is not under any time frame, i am just using any data to have a graph working at first if you know what i mean. CHEERS GUYS (note i did not include connection inc.php) i think the coding is right but you guys will tell me wrong right! <?php include("\FusionCharts\FusionCharts_PHP\App\Includes\FusionCharts.php"); ?> <HTML> <HEAD> <TITLE>FusionCharts Free - Database Example</TITLE> <script LANGUAGE="Javascript" SRC="./FusionCharts/Charts/FusionCharts.js"></SCRIPT> </HEAD> <BODY> <CENTER> <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used a MySQL database containing two //tables. //Connect to the DB $serverName = "CWIHQLA3FF813J\SQLEXPRESS"; $connectionOptions = array("Database" => "PerfMon"); $conn = sqlsrv_connect( $serverName, $connectionOptions) or die ("<p>Problem on connecting to database</p>"); //$strXML will be used to store the entire XML document generated //Generate the graph element $strXML = "<graph caption='Factory Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>"; //Fetch all factory records $queryString = "SELECT TOP 100 LoadPercentage FROM [PerfMon].[dbo].[CPUUsage]"; $result = sqlsrv_query($conn, $queryString) or die ("Problem in executing query"); //Iterate through each factory if ($result) { while($ors = sqlsrv_fetch_array($result)) { //Generate <set name='..' value='..'/> $strXML .= "<set name='CPU Usage' value='" . $ors['LoadPercentage'] . "' />"; } } sqlsrv_close($conn); //Finally, close <graph> element $strXML .= "</graph>"; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("\FusionCharts\Charts\Line.swf", "", $strXML, "LoadPercentage", 650, 450, "", ""); ?> </BODY> </HTML>
  5. Hi i am basically trying to create a simple line graph by gathering data from SQL server, the data itself which i would like to show is, CPU Load percentage which allows me to view over a day what the CPU usage has been like in my webpage. I am using php on wamp server. and i really do not know what i am doing wrong, new to php,new to html, new to most! so would love some help from you veterans!! Really appreciate it. Basically what i am trying to achieve is when you go to task manager, the performance tab shows a CPU line graph, that is all i want! in the most simplest way! In my database i have data for LoadPercentage as you can see below which at the moment is not under any time frame, i am just using any data to have a graph working at first if you know what i mean. CHEERS GUYS (note i did not include connection inc.php) i think the coding is right but you guys will tell me wrong right! <?php include("\FusionCharts\FusionCharts_PHP\App\Includes\FusionCharts.php"); ?> <HTML> <HEAD> <TITLE>FusionCharts Free - Database Example</TITLE> <script LANGUAGE="Javascript" SRC="./FusionCharts/Charts/FusionCharts.js"></SCRIPT> </HEAD> <BODY> <CENTER> <?php //In this example, we show how to connect FusionCharts to a database. //For the sake of ease, we've used a MySQL database containing two //tables. //Connect to the DB $serverName = "CWIHQLA3FF813J\SQLEXPRESS"; $connectionOptions = array("Database" => "PerfMon"); $conn = sqlsrv_connect( $serverName, $connectionOptions) or die ("<p>Problem on connecting to database</p>"); //$strXML will be used to store the entire XML document generated //Generate the graph element $strXML = "<graph caption='Factory Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>"; //Fetch all factory records $queryString = "SELECT TOP 100 LoadPercentage FROM [PerfMon].[dbo].[CPUUsage]"; $result = sqlsrv_query($conn, $queryString) or die ("Problem in executing query"); //Iterate through each factory if ($result) { while($ors = sqlsrv_fetch_array($result)) { //Generate <set name='..' value='..'/> $strXML .= "<set name='CPU Usage' value='" . $ors['LoadPercentage'] . "' />"; } } sqlsrv_close($conn); //Finally, close <graph> element $strXML .= "</graph>"; //Create the chart - Pie 3D Chart with data from $strXML echo renderChart("\FusionCharts\Charts\Line.swf", "", $strXML, "LoadPercentage", 650, 450, "", ""); ?> </BODY> </HTML>
  6. Php Line Graph!?!? Using Sqlsrv Query

    i have seen this but still not easy
  7. Hi i am very new to the language as well as SQL. I need to create a php code which allows me to create a fusion line graph, but the data for the graph needs to be gathered via a SQL SERVER Query. I need help on this part, as i need to know step by step how to do this using fusion charts. I am very confused i have tried reading manuals but i am not good at understanding like that.!!!! really stressed out as i need this asap. I have got sql srver queries running to output onto my html dreamweaver page, but i do not know how to use fusioncharts to output the results onto a chart, and what files are needed etc. PLEASE HELP ME STEP BY STEP i would give so much appreciation to anyone as it is very difficult learning something new which for some people would be easy and a 5minute job!!
  8. Hi i am very new to the language as well as SQL. I need to create a php code which allows me to create a fusion line graph, but the data for the graph needs to be gathered via a SQL SERVER Query. I need help on this part, as i need to know step by step how to do this using fusion charts. I am very confused i have tried reading manuals but i am not good at understanding like that.!!!! really stressed out as i need this asap. I have got sql srver queries running to output onto my html dreamweaver page, but i do not know how to use fusioncharts to output the results onto a chart, and what files are needed etc. PLEASE HELP ME STEP BY STEP i would give so much appreciation to anyone as it is very difficult learning something new which for some people would be easy and a 5minute job!!
  9. Hi i am very new to the language as well as SQL. I need to create a php code which allows me to create a fusion line graph, but the data for the graph needs to be gathered via a SQL SERVER Query. I need help on this part, as i need to know step by step how to do this using fusion charts. I am very confused i have tried reading manuals but i am not good at understanding like that.!!!! really stressed out as i need this asap. I have got sql srver queries running to output onto my html dreamweaver page, but i do not know how to use fusioncharts to output the results onto a chart, and what files are needed etc. PLEASE HELP ME STEP BY STEP i would give so much appreciation to anyone as it is very difficult learning something new which for some people would be easy and a 5minute job!!