Connecting a form input to a chart

I'm trying to display the dashboard form input as number and connect that node to a chart node so that when the user selects a number value from the form, it will display on the chart as a line graph. I'm guessing that you would need a function connecting the form node to the chart node and that msg.payload should equal the value selected in the form, however I'm having a hard time figuring out how to convey that in javascript. Any help would be greatly appreciated.

If I understand, a user will fill in a form (so you are using ui-form?). One of the fields will be a numeric field and you want it added to your chart. Is that the idea?

Will you have a range that the number can be?
How frequently will numbers be added?
What do you want to happen if the user refreshes the window or closes it and reopens it?
Do you intend to store the data anywhere?

thanks, I figured it out...i used a change node instead of a function node and everything is working as I expected. Thanks again