score:0

Accepted answer

I presume your json's output format is wrong. It likes to be [{"name":"HP","data":[[80,85,87.5]]},{"name":"DELL","data":[[65,80,58.5]]},{"name":"SONY","data":[[55,55,60]]}].

and your bubbleChart.php you can fetch data like this

$rows = array();
$rows['name'] = $rowsBubble['product_name'];
$rows1 = array();
$rows1[0] = $rowsBubble['pro_rating'];
$rows1[1] = $rowsBubble['specs_rating'];
$rows1[2] = $rowsBubble['avrg_rating'];
$rows['data'][0] = $rows1;

array_push($result,$rows);

Try this format .Check what your json returns. I think it will be work fine.

score:2

You need to parse your json to have the same data as in hardcoded version. The data require to be numbers, instead of strings.


Related Articles