Chartjs-Increasing php variable in javascript loop

0👍

You shout assign php variables to js variables and work with them.
Something like this

var data = '<?php echo json_encode($readingArray); ?>';

Then convert json string to object

arrayOfObjects = JSON.parse(data)

After that iterate your data and print chart

for (var key in arrayOfObjects) {
console.log(arrayOfObjects[key])
}

Leave a comment