title: AngularJS passing Json to controller and displaying in a DevExpress Chart
body: <p>I have a JsonResult method in my controller.  I have pulled in data from my database and set to an object.  The method will return this object.  I am trying pass this data into AngularJS data source.  I would like to display a DevExtreme bar chart.  Here is code so far. </p>
  
  <p>AngularJS file:             </p>
  
  <pre><code>var app = angular.module('customApp', ['dx']);
  app.controller("chartControl", function ($scope, $http) {
      $scope.sizeSettings = {
          dataSource: 'http://localhost:53640/Home/PostChart',
          commonSeriesSettings: {
              argumentField: 'product_id',
              valueField: "product_id", name: "Product Cost",
              type: "bar"
          },
          seriesTemplate: {
              nameField: 'Source',
          }
      };
  });
  </code></pre>
  
  <p>Home Controller:       </p>
  
  <pre><code>public JsonResult PostChart(int product_id)
      {
          Object prod = null;
          using (ProductOrderEntities db = new ProductOrderEntities())
          {
              var product = db.Products.FirstOrDefault(p =&gt; p.product_id == product_id);
              prod = new {productID = product.product_id, productName = product.product_name, productPrice = product.product_cost, productDescription = product.product_type};                
          }
          return Json(prod, JsonRequestBehavior.AllowGet);
      }
  
  }  
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div ng-app="customApp"&gt;
      &lt;div ng-controller="chartControl"&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;      
  </code></pre>