Hi,
We have copied and modified your fiddle. Here is the updated fiddle. In the updated fiddle, after pressing the calculate button, you get the famname array for the values of Y-axis and vrijed array for the value of x-axis. Using vrijed and famname arrays, you can store and pass these values to the dataPoints property of the CanvasJS object, in the format required by CanvasJS.