Home forums Report Bugs Line Graph Point Connection Bug Reply To: Line Graph Point Connection Bug



Hi @vishwas R, I use this code to update my chart:
function updateEcg() {
$.getJSON(“/data_ecg.php”, function (result) {
if (dataLength !== result.length) {
for (var i = dataLength; i < result.length; i++) {
x: parseInt(result[i].valuex),
y: parseFloat(result[i].valuey)});
if (data.length > 478) {
data.shift(); }}
dataLength = result.length;
How you can see I parse my valueX to Int , and yes some of my X values are not in order, I attach you an image ( data order ) where you can see that the counter is not having order when it is inserting. Do you know how can I sort my X values to have a good chart?