Injecting data & timestamp into chart

Hi there, I am attempting to inject a set a data that i received from my WatsonIoT Device and putting it into a continuing chart for display. To make it easier for a test run, I chopped off all but one specific set of data, as follows:

[{"V":2,"T":1573853970884,"Q":0},{"V":21,"T":1573853971900,"Q":0},{"V":94,"T":1573853972915,"Q":0},{"V":64,"T":1573853973930,"Q":0},
...and so forth.

What i am hoping to do is to chop off the Q value, then inject both the value and the timestamp correctly into a chart, since it is coming in from the IoT Device in chunks.

The issue I am having is that i cannot seem to put this data into the chart. I can split the data to get the value only presented, but I'm not sure how to present it together with the timestamp.

Is there a way to properly manipulate the data so it can fit perfectly within a chart when it runs?

If you are receiving the data in chunks, you will need to send every element from that incoming array separately.

var chartdata = msg.payload

for(var i = 0;i<chartdata.length ; i++){
    msg = {payload:chartdata[i].V, timestamp:chartdata[i].T};
    node.send(msg);
}

And as Q is not needed, it is ignored.

Read more: https://github.com/node-red/node-red-dashboard/blob/master/Charts.md