hello i have a problem with this json done with php
[{“type”:”stackedColumn100″,”indexLabelFontColor”:”white”,”indexLabelPlacement”:”inside”,”indexLabel”:”{y} (#percent %)”,”legendText”:2014,”dataPoints”:[{“label”:”IVAN OLIVARES”,”y”:16},{“label”:”PACO PATINo”,”y”:null},{“label”:”JOSE MARIA”,”y”:4}]},{“type”:”stackedColumn100″,”indexLabel”:”{y} (#percent %)”,”indexLabelFontColor”:”white”,”indexLabelPlacement”:”inside”,”legendText”:2015,”dataPoints”:[{“label”:”IVAN OLIVARES”,”y”:9},{“label”:”PACO PATINo”,”y”:10},{“label”:”JOSE MARIA”,”y”:5}]}]
when i get the json with ajax jquery in that dinamic code, the web page crashes
function pick(){
$.ajax({
type: “POST”,
cache: false,
url: “panama_monitor_json2.php”,
dataType: “json”,
success: function(data) {
var options = {
title:{
text: “Trabajo Operario”
},
axisY:{
title: “Porcentaje”
},
legend:{
verticalAlign: “top”,
horizontalAlign: “center”
},
data:
data
};
$(“#chartContainer2”).CanvasJSChart(options);
setTimeout(function(){pick()}, 5000);
}
});
}