First time with node red, issue with chart node

Hi I am new here and work with node red the first time.
I am a programmer in vb.net. So some knowledge about programming is there.
I want to display some values with the chart node.
I imported a flow from the www to learn, but I get "no data available" with that.
It contains an inject node, which triggers a function node, that increases a simple value every 3 seconds. thes values i want to display with a bar chart. But the dashboard say "no data available".

code in the function node:

var i = 0;

i = i + 5;

msg.payload = {
"series": ["Wert"],
"data": [
[20 + i]
],
"labels": ["Zeit"]
};

return msg;

What I did wrong?

Wrap it in [ ]

var i = 0;

i = i + 5;

msg.payload = [{
"series": ["Wert"],
"data": [
[20 + i]
],
"labels": ["Zeit"]
}];

return msg;

Add an inject node to trigger the data

1 Like

thank you!