Looking at this JFiddle demonstration of Highcharts
http://jsfiddle.net/yxz80f4u/9/
We can observe the data being inserted as
[Date.UTC(YYYY,MM,DD,HH,MM,SS), Y-data-point]
data: [
[Date.UTC(1970, 7, 5,1,1,1), 2.22],
[Date.UTC(1970, 7, 5,2,2,1), 1.15],
[Date.UTC(1970, 7, 5,2,30,1), 1.15],
[Date.UTC(1970, 7, 5,3,50,1), 0],
[Date.UTC(1970, 7, 5,10,50,1), 2.5],
]
It is functioning perfectly. Now the issue arises on how to achieve the same outcome
Using arrays of data points.
Year_array = ["5/7/1970 1:1:1 AM" , " another year ", etc....] Datapoints= [2.22,1.15, etc...]
OR from my controller
graph_points.year.Add("2015, 1, 2, 9, 29, 00");
graph_points.year.Add("20015, 1, 2, 9, 31, 00");
graph_points.chlorine.Add(10.1);
graph_points.chlorine.Add(10.12);
So how can I replicate the same function when working with two arrays of data points as shown?
UPDATE:
Hello, thank you for your advice. Are you suggesting something along these lines?
for (var i = 0; i < year.length; i++) {
myseries.push(Date.UTC(year[i]),chlorine[i]);
}
UPDATE: Hello again, thanks for your help, just one more question ! I followed your instructions
for (var i = 0; i < year.length; i++) {
var datapoint = [];
var d = new Date(Date.parse());
datapoint.push(year[i]);
datapoint.push(chlorine[i]);
data.push(datapoint);
However, it displays 00:00:00 on the x-axis inexplicably