Need Help With Javascript Code

I have been able to grab a line graph from codepen.

I can get it to display, but I have not idea how to change the javascript used to make the line graph show actual data instead of the programmed random data.

Here is a link to the editor. I run the workflow run javascript.

Any help would be much appreciated. I really just want to be able to add dynamic data and can not decipher how to remove the random data math used so I can insert my dynamic data values.

In the javascript there you have numbers in the format of a table that get converted to a list of numbers to be plotted. If you replace the typed numbers with a dynamic data expression that also just returns a single number, it should update.

Not sure what the end use case is, but it may be easier to use a list of numbers instead of a table format.

Thanks for taking a look @david17

I am really not sure how to change the code that is currently used to create the random numbers

Screen Shot 2020-06-26 at 1.13.09 AM

Screen Shot 2020-06-26 at 1.14.53 AM

What I am hoping for is a way to change all that stuff to be something I could more easily decipher and manipulate myself. Something like this which was used for a bar chart that I got to work fine.

Screen Shot 2020-06-26 at 1.16.18 AM

My end goal is to be able to plot lines on the line graph displaying a series of numbers that are associated with a specific date. What I did with the bar chart was to set the number of clicks on a certain day to get this working in my app

I figure a bar chart and line graph are just different ways to visualize the same kind of data so if I can get the javascript for the line graph to be able to accept the data and plot it the same way the bar chart does, I should be able to get things working.

This is how I have the data in javascript for the bar chart in my app

It is just the javascript on the line graph has random numbers and it uses math to create them and I can’t figure how to replace it with something like the bar chart javascript data points.