Hi I a been struggling with a Dash board can't get any data in from an external CSV file to render any charts. When I put an Alert tag it loops on the node.js HTTP server.
Htnl code to call AJAX
/======UPDATE
var updateChart = function () {
$.ajax({
type: "GET",
url: "podData.csv",
dataType: "text",
success: function(csv) {
var dataPoints = csvLines = points = [];
csvLines = csv.split(/[\r?\n|\r|\n]+/);
UD=csvLines.length -2;
points = csvLines[UD].split(",");
}
});
HTTP: NodeJS
var http = require('http');
var fs = require('fs');
http.createServer(function (req, res) {
fs.readFile('./DFH_COP_dashboard_v1.html', function(err, data) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(data);
res.end();
});
}).listen(8080);