title: Morris charts are not working with dynamic data, even after sending data in Json format
body: <p>I am using Morris graphs in my website, but when I am sending data in JSON format dynamically, then it is not working. But at the same time, if I push data manually, its starts working.
  Please suggest some suggestion.</p>
  
  <p>Here is the code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function generateUserGraph() {  
              // some logic and below object is return  
              var toreturn = "{ Y: '10000001', A: '-1' }, { Y: '10000045', A: '1' }";
              return toreturn;
          }
  
          Morris.Bar({
              element: 'NLcurrentProgressBar',
              resize: true,
              data: [generateUserGraph()],
              barColors: function (row, series, type) {
                  if (row.y == 0) {
                      return ['#6D5858'];
                  }
                  else if (row.y &lt; 0) {
                      return ['#E71717'];
                  }
                  else {
                      return ['#00a65a'];
                  }
              },
              xkey: ['Y'],
              ykeys: ['A'],
              labels: ['&lt;a href="www.google.com"&gt;Question&lt;/a&gt;'],
              hideHover: 'auto'
          });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id = "NLcurrentProgressBar"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please suggest on the above code. If I directly pass the above string then it works but when I pass it using a function then no result renders</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>like : below code is working :
  data: [{ Y: '10000001', A: '-1' }, { Y: '10000045', A: '1' }],</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>but this is not working :
  data: [generateUserGraph()]</code></pre>
  </div>
  </div>
  </p>