Search the Community

Showing results for tags 'xampp'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company Forums
    • Company News
  • Product Forums
    • FusionCharts XT
    • FusionWidgets XT
    • PowerCharts XT
    • FusionMaps XT
    • Collabion Charts for SharePoint
    • jQuery Plugin for FusionCharts
    • AngularJS plugin
    • ReactJS plugin
  • General Forums
    • FusionCharts Jobs and Consultation
    • FusionLounge

Found 3 results

  1. I would like to ask how to create a project that has FusionCharts taking data from a database using the xampp 7.2 application. The tutorial is made for wampp. I have tried this tutorial ( https://www.fusioncharts.com/dev/using-with-server-side-languages/tutorials/php-mysql-charts ) using the xampp application but it does not work. How do I implement FusionCharts' database integration using xampp? Please teach me using the example in the link if possible and provide details on the folders/directories used along with the code. I have attached the full sample project I created. The project was placed in "xampp/htdocs/FusionCharts Sample/ ". FusionCharts_Sample.rar
  2. 2D Column stack - limited to 7

    Hello there, I'm using MySQL/PHP with PHPWrapper to make use of the FusionCharts. I've been able to get the data to get it rendered as 2D column stacks but are stuck at 7 despite having any limits attached to it. I'm using it to display the count of records for each month starting Apr, till Nov but the first stack starts from May when I Group the data by month in ASC. The interesting bit is that when i change this to DESC, i see the data from OCt- Apr (7 records) and the Nov data goes missing. I have not kept any limits defined that may be stopping this but yet i can get this to work. My data set type in MySQL are; acqid - INT acq_month - DATE fusioncharts.php & its associated JS are properly called upon in the file. Can anyone help? Thanks!!! Following is the code that I'm using; <?php // Form the SQL query that returns the top 10 most populous countries $strQuery = "SELECT count(acqid), acq_month FROM newacq GROUP BY MONTH(acq_month) ASC limit 13"; // Execute the query, or else return the error message. $result = $conn->query($strQuery) or exit("Error code ({$conn->errno}): {$conn->error}"); $arr=mysqli_fetch_array($result); //while($arr=mysqli_fetch_array($result)) { // print_r($arr); //} // If the query returns a valid response, prepare the JSON string if ($result) { // The `$arrData` array holds the chart attributes and data $arrData = array( "chart" => array( "caption" => "New Acq", "showValues" => "1", "theme" => "zune" ) ); $arrData["data"] = array(); // Push the data into the array while($row = mysqli_fetch_array($result)) { array_push($arrData["data"], array( "label" => date("M-Y", strtotime($row["acq_month"])), "value" => $row["count(acqid)"], ) ); } /*JSON Encode the data to retrieve the string containing the JSON representation of the data in the array. */ $jsonEncodedData = json_encode($arrData); /*Create an object for the column chart using the FusionCharts PHP class constructor. Syntax for the constructor is ` FusionCharts("type of chart", "unique chart id", width of the chart, height of the chart, "div id to render the chart", "data format", "data source")`. Because we are using JSON data to render the chart, the data format will be `json`. The variable `$jsonEncodeData` holds all the JSON data for the chart, and will be passed as the value for the data source parameter of the constructor.*/ $columnChart = new FusionCharts("column2D", "myFirstChart" , 820, 300, "chart-1", "json", $jsonEncodedData); // Render the chart $columnChart->render(); // Close the database connection $conn->close(); } ?> <div id="chart-1"><!-- Fusion Charts will render here--></div> With ASC this is how it appears; And with DESC this is how it appears; EDIT - When i tried fetching the details carried out in the ARRAY using [print_r], I got the following message; Array ( [0] => 208 [count(acqid)] => 208 [1] => 2017-04-01 [acq_month] => 2017-04-01 ) Array ( [0] => 241 [count(acqid)] => 241 [1] => 2017-05-01 [acq_month] => 2017-05-01 ) Array ( [0] => 243 [count(acqid)] => 243 [1] => 2017-06-01 [acq_month] => 2017-06-01 ) Array ( [0] => 269 [count(acqid)] => 269 [1] => 2017-07-01 [acq_month] => 2017-07-01 ) Array ( [0] => 373 [count(acqid)] => 373 [1] => 2017-08-01 [acq_month] => 2017-08-01 ) Array ( [0] => 370 [count(acqid)] => 370 [1] => 2017-09-01 [acq_month] => 2017-09-01 ) Array ( [0] => 283 [count(acqid)] => 283 [1] => 2017-10-01 [acq_month] => 2017-10-01 ) Array ( [0] => 312 [count(acqid)] => 312 [1] => 2017-11-01 [acq_month] => 2017-11-01 ) It does show the information carried out for April & Nov including. If it helps!
  3. Xampp

    Hello, I'm struggling with the tutorial based on php and database. I'm using xampp as web hosting server. The link of the tutorial is as follows: http://www.fusioncharts.com/tutorials/php-mysql-charts/ There are four steps in the tutorial. As far as I have understood, the first three steps ask to create a file name "char_data.php". I have saved the file with the code from tutorial. The complete code is as follows: <?php> <html> <head> <body> <title>My first chart using FusionCharts Suite XT</title> <script type="text/javascript" src="fusioncharts/fusioncharts.js"></script> <script type="text/javascript" src="fusioncharts/themes/fusioncharts.theme.zune.js"></script> USE test; C REATE TABLE top_odi_wicket_takers(player varchar(255),wickets integer, PRIMARY KEY (player) ); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('MA Starc', 34); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('ST Finn', 27); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('Imran Tahir', 25); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('M Morkel', 21); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('TA Boult', 36); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('TG Southee', 28); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('CJ Anderson', 25); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('Wahab Riaz', 25); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('JH Davey', 21); INSERT INTO top_odi_wicket_takers(player, wickets) VALUES('UT Yadav', 22); SELECT * FROM top_odi_wicket_takers; +-------------+---------+ | player | wickets | +-------------+---------+ | CJ Anderson | 25 | | Imran Tahir | 25 | | JH Davey | 21 | | M Morkel | 21 | | MA Starc | 34 | | ST Finn | 27 | | TA Boult | 36 | | TG Southee | 28 | | UT Yadav | 22 | | Wahab Riaz | 25 | +-------------+---------+ 10 rows in set (0.00 sec) With this we have the required data i //address of the server where db is installed $servername = "localhost"; //username to connect to the db //the default value is root $username = "root"; //password to connect to the db //this is the value you would have specified during installation of WAMP stack $password = ""; //name of the db under which the table is created $dbName = "test"; //establishing the connection to the db. $conn = new mysqli($servername, $username, $password, $dbName); //checking if there were any error during the last connection attempt if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } //the SQL query to be executed $query = "SELECT * FROM top_odi_wicket_takers"; //storing the result of the executed query $result = $conn->query($query); //initialize the array to store the processed data $jsonArray = array(); //check if there is any data returned by the SQL Query if ($result->num_rows > 0) { //Converting the results into an associative array while($row = $result->fetch_assoc()) { $jsonArrayItem = array(); $jsonArrayItem['label'] = $row['player']; $jsonArrayItem['value'] = $row['wickets']; //append the above created object into the main array. array_push($jsonArray, $jsonArrayItem); } } //Closing the connection to DB $conn->close(); //set the response content type as JSON header('Content-type: application/json'); //output the return value of json encode using the echo function. echo json_encode($jsonArray); //Closing the connection to DB $conn->close(); //set the response content type as JSON header('Content-type: application/json'); //output the return value of json encode using the echo function. echo json_encode($jsonArray); var apiChart = new FusionCharts({ type: 'column2d', renderAt: 'api-chart-container', width: '550', height: '350', dataFormat: 'json', dataSource: { "chart": chartProperties, "data": chartData } }); $(function(){ $("#background-btn").click(function(){ modifyBackground(); }); $("#canvas-btn").click(function(){ modifyCanvas(); }); $("#dataplot-btn").click(function(){ modifyDataplot(); }); apiChart.render(); }); function modifyBackground(){ //to be implemented } function modifyCanvas(){ //to be implemented } function modifyDataplot(){ //to be implemented } <div id="chartContainer">FusionCharts XT will load here!</div> </body> </head> </html> </?php> As i try to run the file "chart_data.php" in local host and I get the following page showing up: The fourth step ask to create another file under name "char_sample.html". The code is as follows: <html> <head> <body> <title>My first chart using FusionCharts Suite XT</title> <script type="text/javascript" src="fusioncharts/js/fusioncharts.js"></script> <script type="text/javascript" src="fusioncharts/js/themes/fusioncharts.theme.fint.js"></script> <!DOCTYPE html> <title>FusionCharts Column 2D Sample</title> </head> <body> <div id="chart-container">FusionCharts will render here</div> <script src="js/jquery-2.1.4.js"></script> <script src="js/fusioncharts.js"></script> <script src="js/fusioncharts.charts.js"></script> <script src="js/themes/fusioncharts.theme.zune.js"></script> <script src="js/app.js"></script> $(function(){ $.ajax({ url: 'http://localhost/chart_data.php' type: 'GET', success : function(data) { chartData = data; var chartProperties = { "caption": "Top 10 wicket takes ODI Cricket in 2015", "xAxisName": "Player", "yAxisName": "Wickets Taken", "rotatevalues": "1", "theme": "zune" }; apiChart = new FusionCharts({ type: 'column2d', renderAt: 'chart-container', width: '550', height: '350', dataFormat: 'json', dataSource: { "chart": chartProperties, "data": chartData } }); apiChart.render(); } }); }); <div id="chartContainer">FusionCharts XT will load here!</div> </body> </head> </html> Running the file in the localhost gives this result: I don't see any chart by running both these files in the localhost. Whereas, I'm supposed to end up having chart. Any help would be great.