Difficulty in using php json_encode data received in javascript to display graph using chart.js library

๐Ÿ‘:-1

With my previous experience on rendering the PHP json data inside JS, I could get it by rendering it as a string and then parse it. Something like this.

var WData = "'"+<?php echo json_encode($WData);?>+"'";
 jData= JSON.parse(wData); 

Leave a comment