title: how to add dynamic data to morris bar chart
body: <p>I want to add data to Morris bar-chart via ajax. Following is the json which i get in ajax success</p>
  
  <p><code>[{"x":"2014-10-02","y":"1"},{"x":"2014-10-19","y":"1"},{"x":"2014-10-20","y":"1"},{"x":"2014-11-13","y":"1"}]</code></p>
  
  <p>following is the js code</p>
  
  <pre><code>var chart = Morris.Bar({
          element : 'normal-bar-graph',
          data : [{
              "x" : null,
              "y" : null
          }],
          xkey : 'x',
          ykeys : ['y'],
          labels : ['Added']
      });
  $.ajax({
              type: "POST",
              url:  "some_url",
              data: {'user_report':[k,v]},
  
              success: function(html)                    
              {   
                  if(html == "error")
                  {
                  alert('error');
                  }
                  else
                  {
                      chart.setData(html);
  
                  }
                  hide_loading();
              }
          });
  </code></pre>
  
  <p>am using <code>/morris/raphael.2.1.0.min.js</code> and <code>/morris/morris.min.js</code>.
   The <code>chart.setData(html);</code> functionality does not work as said in the documentation of morris.</p>
  
  <p>thank in advance. please point me out if any error made.</p>
  
  <p>have also made a jsbin if that can help: <a href="http://jsbin.com/nepavododu/edit?html,js,output">morris</a></p>