title: pass json data from controller to view
body: <p>Partial View : </p>
  
  <pre><code>var dataa;
      $.ajax({
          url: ServerUrl + '/Dashboard/GetData',
          type: 'POST',
          cache: false,
          dataType: 'text',
          async: true,
          error: function (xhr) {
              //alert('Error: ' + xhr.statusText);
          },
          success: function (result) {
              debugger;
              dataa = result;
              var chart = c3.generate({
                  data: {
                      type: 'bar',
                      json: [
                          dataa
                      ],
                      keys: {
                          x: 'indicator',
                          value: ['total']
                      }
                  },
                  axis: {
                      x: {
                          type: 'category'
                      }
                  },
                  bar: {
                      width: {
                          ratio: 0.5
                      }
                  }
              });
          }
      });
  </code></pre>
  
  <p>Controller Json code </p>
  
  <pre><code>public string GetData()
  {
  return "{ 'indicator': 'X', 'total': 100 },{ 'indicator': 'Y', 'total': 200 },{ 'indicator': 'Z', 'total': 300 }";
  }
  </code></pre>
  
  <p>When i use the above code it doesn't work  but if I pass json data as specified in <a href="http://jsfiddle.net/z2erLqgx/2/" rel="nofollow">this JS Fiddle</a> link, it works. Am I passing the JSON data incorrectly from controller.?</p>
  
  <p>Please help.</p>