html - Dygraph data not plotting in WIN7 and beyond? -
the hardware utilizing dygraph javascript embedded pic24fj64gb004 configured data logger , mass storage device, thumb drive. unplugged usb logs 9 axis of inertial data: accerleration, angular velocity, , magnetometer onto root drive .csv files. when plugged usb port batch file parses data text files location available .html display utilizing dygraph javascript.
the system works ok within winxp sp3 fails display data in future versions of windows.
utilizing f12 developer tools text files not formed within winxp, in windows 10 - f12 states following:
dygraph-combined.js:2 xmlhttprequest cannot load file:///c:/users/cal/desktop/er9d0f/temp/graph/data/accelerate.txt. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.dygraph.start_ @ dygraph-combined.js:2 dygraph-combined.js:2 xmlhttprequest cannot load file:///c:/users/cal/desktop/er9d0f/temp/graph/data/gyrate.txt. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.dygraph.start_ @ dygraph-combined.js:2 dygraph-combined.js:2 xmlhttprequest cannot load file:///c:/users/cal/desktop/er9d0f/temp/graph/data/magnetic.txt. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.dygraph.start_ @ dygraph-combined.js:2 dygraph-combined.js:2 xmlhttprequest cannot load file:///c:/users/cal/desktop/er9d0f/temp/graph/data/temp.txt. cross origin requests supported protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.dygraph.start_ @ dygraph-combined.js:2 util
question: why difference between 2 operating systems? .net version issue? there more detailed description data formatting?
thank cy drollinger
html below , portion of data file below this
<!doctype html> <html> <head> <meta http-equiv="x-ua-compatible" content="ie=emulateie7; ie=emulateie9"> <title>dygraph</title> <!--[if ie]> <script type="text/javascript" src="../excanvas.js"></script> <![endif]--> <!-- production (minified) code, use: <script type="text/javascript" src="dygraph-combined.js"></script> --> <script type="text/javascript" src="dygraph-combined.js"></script> <style type="text/css"> #div_g1 { position: absolute; left: 210px; top: 50px; } #div_g2 { position: absolute; left: 720px; top: 50px; } #div_g3 { position: absolute; left: 210px; top: 450px; } #div_g4 { position: absolute; left: 720px; top: 450px; } </style> </head> <body> <p>acceleration, angular velocity, , magnetic field viewable upon double click!</p> <div id="div_g1"></div> <div id="div_g2"></div> <div id="div_g3"></div> <div id="div_g4"></div> <script type="text/javascript"> g1 = new dygraph(document.getelementbyid("div_g1"), "data/accelerate.txt",{fillgraph: true, avoidminzero: true,title: 'x y z acceleration', xlabel: 'time (sec)', ylabel: 'acceleration(g)'}); g2 = new dygraph(document.getelementbyid("div_g2"), "data/gyrate.txt",{fillgraph: true, avoidminzero: true,title: 'x y z angularvelocity', xlabel: 'time (sec)', ylabel: 'angularvelocity(deg/sec)'}); g3 = new dygraph(document.getelementbyid("div_g3"), "data/magnetic.txt",{fillgraph: true,avoidminzero: true,title: 'x y z heading', xlabel: 'time (sec)', ylabel: 'heading (ut)'}); g4 = new dygraph(document.getelementbyid("div_g4"), "data/temp.txt",{fillgraph: true,avoidminzero: true,title: 'temperature', xlabel: 'time (sec)', ylabel: 'temperature (c)'}); </script> </body> </html> data file (a portion)
time(sec.),x acceleration(g), y acceleration(g), z acceleration(g) 0.00, -0.71408, 0.05718, 0.59433 0.01, -0.72532, 0.08358, 0.58553 0.02, -0.72776, 0.09677, 0.59433 0.03, -0.76051, 0.11339, 0.57087 0.04, -0.76051, 0.12366, 0.56696 0.05, -0.78739, 0.12317, 0.58113 0.06, -0.77713, 0.09775, 0.62268 0.07, -0.78250, 0.12512, 0.65591 0.08, -0.77713, 0.10802, 0.62072 0.09, -0.80401, 0.06891, 0.53568 0.10, -0.76246, 0.11241, 0.53324
i have parsed data data.js data.js file utilized in example: temperature-sf-ny.html. example function accelerate called. data.js looks this:
function accelerate() { return "" + "time,x,y,z\n" + "0.00,0.10508,0.51271,1.29130\n" + "0.01,0.09091,0.47410,1.20039\n" + "0.02,0.06158,0.42815,1.04545\n" + "0.03,0.03715,0.38856,0.88465\n" + "0.04,0.01711,0.33920,0.73705\n" + "0.05,-0.07234,0.33920,0.65445\n" + "0.06,-0.12366,0.34702,0.66373\n" + "0.07,-0.14809,0.40860,0.74487\n" + "0.08,-0.18377,0.43842,0.83627\n" + "0.09,-0.18328,0.41740,0.86706\n" + "0.10,-0.15152,0.39638,0.92180\n" + "0.11,-0.08944,0.38905,1.00440\n" + while did not answer question me needed be. there more detailed description of data components within quicklinks on index page: data formats.
Comments
Post a Comment