directory of data.php
-
i prepared a chart for gather data from mysql database table and paste javascript code in javascript space ‘AmCharts.loadJSON = function(url) {
// create the request
if (window.XMLHttpRequest) {
// IE7+, Firefox, Chrome, Opera, Safari
var request = new XMLHttpRequest();
} else {
// code for IE6, IE5
var request = new ActiveXObject(‘Microsoft.XMLHTTP’);
}// load it
// the last “false” parameter ensures that our code will wait before the
// data is loaded
request.open(‘GET’, url, false);
request.send();// parse adn return the output
return eval(request.responseText);
};AmCharts.ready(function() {
// load the data
var chartData = AmCharts.loadJSON(‘data.php’);// this is a temporary line to verify if the data is loaded and parsed correctly
// please note, that console.debug will work on Safari/Chrome only
console.debug(chartData);// build the chart
// …
});var %CHART%;
// create chart
AmCharts.ready(function() {// load the data
var chartData = AmCharts.loadJSON(‘data.php’);// SERIAL CHART
chart = new AmCharts.AmSerialChart();
chart.pathToImages = “https://www.amcharts.com/lib/images/”;
chart.dataProvider = chartData;
chart.categoryField = “category”;
chart.dataDateFormat = “YYYY-MM-DD”;// GRAPHS
var graph1 = new AmCharts.AmGraph();
graph1.valueField = “value1”;
graph1.bullet = “round”;
graph1.bulletBorderColor = “#FFFFFF”;
graph1.bulletBorderThickness = 2;
graph1.lineThickness = 2;
graph1.lineAlpha = 0.5;
chart.addGraph(graph1);var graph2 = new AmCharts.AmGraph();
graph2.valueField = “value2”;
graph2.bullet = “round”;
graph2.bulletBorderColor = “#FFFFFF”;
graph2.bulletBorderThickness = 2;
graph2.lineThickness = 2;
graph2.lineAlpha = 0.5;
chart.addGraph(graph2);// CATEGORY AXIS
chart.categoryAxis.parseDates = true;// WRITE
chart.write(“chartdiv”);
});’also o prepared data.php it is ok . but what is the directry or folder that data.php exist i add to it – C:\xampp\htdocs\wordpress\wp-content\plugins\amcharts-charts-and-maps this folder… please give me folder that should be exiost aloso i’m new comer
https://www.ads-software.com/plugins/amcharts-charts-and-maps/
- The topic ‘directory of data.php’ is closed to new replies.