Chart line in Dashboard

Hi, I am a bit new to nodered and I need to make a line chart in dashboard with the data I am receiving.
The first data is a value for the X axis and the second for the Y axis.
I receive a lot of these pairs and I would like to represent them in the chart.
I have this function to treat the payload data but it does not represent anything:
image

Any help?
Thanks