You must be logged in to post your query.
Home › Forums › Chart Support › New Datapoints do not get connected in the graph
Hi, I’m trying to add new datapoints to my graph. The graph should contain progress on 2 excercises and the weight used (only in german) on every training
They will show up in the legend, but will not connected in the graph. http://jsfiddle.net/QwZuf/432/ I hope you can see it at jsfiddle, the graph was meant to take a standalone html page (so its quite big) After several attempts I finally got the buttons and adding of datapoints running but they won’t show up ?
Jelch,
Here y values are string. So, by parsing newly assigned y values to number will render the updated chart. Change the click handler function as below-
$("#AddDate").click(function () { dataPointsK.push({ x:TrainingNr ,y: Number(document.getElementById("deadlift").value)}); dataPointsB.push({ x: TrainingNr,y: Number(document.getElementById("benchpress").value)}); TrainingNr = TrainingNr +1 chart.render(); });
wow thank you so much ! now it works. Now i only have to find a way to store the datapoints in a file (tsv or something). But that has much lower priority.
Thank you so much again !
You must be logged in to reply to this topic. Login/Register