Hi, i've got myself really confuse with this all now and i could do with an outsider having a look...
I am plotting graphs using Flot for jQuery, it likes its data set in the following way:
where each item of the aray has an x any y coordinate.
I have a data set which is created by php and written to a text file like this:
And then im using a xmlhttprequest to grab the textfile and put it into the dataText variable, then im trying to split that into an array ready to plot:
Its not working right, and im pretty sure its because im not splitting the text file into the array properly but i cant get my head around how it should be done?
any help would be truly fantastic!
I am plotting graphs using Flot for jQuery, it likes its data set in the following way:
Code:
var d1 = [[1224690646000, 4], [1224690663000, 4], [1224690672000, 1], [1224693751000, 4], [1224693166000, 4]]
I have a data set which is created by php and written to a text file like this:
Code:
1224690646000, 4+1224690663000, 4+1224690672000, 1+1224693751000, 4+1224693166000, 4
And then im using a xmlhttprequest to grab the textfile and put it into the dataText variable, then im trying to split that into an array ready to plot:
Code:
dataText = oXML.responseText;
dataTextSplit = dataText.split("+");
Its not working right, and im pretty sure its because im not splitting the text file into the array properly but i cant get my head around how it should be done?
any help would be truly fantastic!