Hello, I am new to node red, I created a csv node to read csv file, then to a function, which extract two columns, like this
var output = [];
var g_total_time = [];
var g_energy= [];
for(let i=0; i<data.length; i++)
{
var t_energy = { "x":data[i]["Total_Time"] , "y":data[i]["Energy"] };
g_energy.push(t_energy );
}
output = [
g_energy,
]
msg.payload = [
{
"series":['Energy',],
"data": output,
"labels":['Energy',],
},
];
return msg;
And, I pass the msg to a chart in dashboard panel(Line Chart)....
Here, I used two columns in csv file for ploting chart, Total_Time - total time taken for the work in minutes(like- 20.03), and Energy level(like-20001).
In Default, the x-axis is shown as time axis in the chart node, how to change the x-axis, so that, I can plot total_time in minutes
Thanks