good morning,
I state that I am new to this platform and I am not at all expert in Javascript. I need to do a project in which I have to take data from a sheet of libreoffice calc and create a chart with those. I found a program that creates me a graph with variable axes but I can't insert the values contained in the array of objects as graph values. Here I am attaching a photo of my program.
this is the program for the chart:
var temp=[];
var time_float = 0;
var temp_float=0;
temp[0] = 24.5
temp[1] = 26
temp[2] = 28
temp[3] = 30
time[0] = 1552215913000
time[1] = 1552218111000
time[2] = 1552225320000
time[3] = 1552232527000
var i=0;
var dataarray = [[]];
for (i=0; i< 4; i++) {
time_float = Number(time[i]);
temp_float = Number(temp[i]);
dataarray[0][i] = {"x":time_float,"y":temp_float};
}
var chart = [{
"series":["Temperature ="],
"data":dataarray,
"labels":[""]
}];
msg.payload = chart;
return msg;
and this is how the data of libreoffice calc are taken
Thanks in advance.