How to Plot line chart of real time data

i am stuck in Hichart template code. how to pass values to x and y axis in Highchart template code?

This is my function code

var point={}
var buffer=msg.payload.split(",");
var values= ;

point.x=parseInt(buffer[0])
point.y=parseInt(buffer[1])
values.push(point);

msg.payload=
[{data:values}];

return msg;