Charts in zend framework2 <p>I am working with zend framework 2 and i want to display charts in some views but it doesn't work!! This is my Action:</p> <pre><code>public function statvehAction(){ $data = [ 'labels' =&gt; ["January","February","March","April","May","June","July"], 'data' =&gt; [18,99,30,81,28,55,30] ]; json_encode($data); $viewModel = new ViewModel(array('data' =&gt; $data)); return $viewModel; } </code></pre> <p>this is my view:</p> <p> </p> <pre><code>&lt;script src="../../../../jquery.min.js"&gt;&lt;/script&gt; &lt;script src="../../../../chart.min.js"&gt;&lt;/script&gt; &lt;script&gt; (function($){ var ctx = document.getElementById("chart").getContext("2d"); $.ajax({ type: "POST", url: "VehiculesController.php", dataType: "json" }) .success(function(data) { var d = { labels: $data.labels, datasets : [ { fillColor: "rgba(220,220,220,0.5)", strokeColor: "rgba(220,220,220,1)", data: data.data }] }; var barChart = new Chart(ctx).Bar(d); }); })(jQuery); &lt;/script&gt; </code></pre> <p>But when i want to diplay my chart i got a white page whith no error !! Please can you help me to solve this problem.</p>