1👍
✅
You need to set the $.get
to receive json
so it knows the dataType coming back.
$.get('chartBar.php', {type: "bar"}, function(dataBar){},'json');
Source:stackexchange.com