title: Pie chart creating from JSON Data in Javascript
body: <p>I am new in PHP and JavaScript, i need to create a pie chart using JSON data  which will be get from the URL. The JSON data is :</p>
  
  <pre><code>[
    {"Domain":"Artificial Intelligence","Count":"46"}, 
    {"Domain":"Data Architecture","Count":"21"}, 
    {"Domain":"Data Science","Count":"50"}, 
  ]
  </code></pre>
  
  <p>The code :</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;   
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;link href="http://cdn-na.infragistics.com/igniteui/2018.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /&gt;
  &lt;link href="http://cdn-na.infragistics.com/igniteui/2018.1/latest/css/structure/infragistics.css" rel="stylesheet" /&gt;
  
  &lt;script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"&gt; 
  &lt;/script&gt;
  &lt;script src="http://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://cdn- na.infragistics.com/igniteui/2018.1/latest/js/infragistics.core.js"&gt;&lt;/script&gt;
  &lt;script src="http://cdn-na.infragistics.com/igniteui/2018.1/latest/js/infragistics.dv.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
   # Reading JSN Data from URLS
   $jsn_data =    
   file_get_contents("http://localhost:9080/Badges/reporting/badge_json.php");
    &lt;div id="chart"&gt;&lt;/div&gt;
    &lt;script type="text/javascript"&gt;
  
     $("#chart").igPieChart({
              width: "435px",
              height: "435px",
              dataSource: result, 
              dataValue: "count",
              dataLabel: "Domain",
              labelsPosition: "bestFit"
          });
  
        });
      &lt;script&gt;
  
   &lt;/body&gt;
   s&lt;/html&gt;
  </code></pre>
  
  <p>But this code does not work. please tell me how do this ?</p>