title: Creating Pie chart in High Chart
body: <p>I'm having a table in MySQL with the following data</p>
  
  <pre><code>Buy_client    Amount
  
  ABC            6597
  XYZ            4479
  PQR            2075
  qqq            1706
  ttt            1030
  Other          450
  </code></pre>
  
  <p>I want to show the following data in a Pie Chart in High Charts. Someone please help me with this. I'm new to both PHP and HighCharts </p>
  
  <p>Question 1: I need to Create a Pie chart from this data</p>
  
  <p>Question 2: I'm using HighCharts for this. Someone please help me to do this in HighCharts  </p>
  
  <hr>
  
  <p>I have used the following code to do this but it doesn't show the info in a pie chart but just display the data in the web browser</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;Highcharts Example&lt;/title&gt;
  
  
  
  
  &lt;?php
  $con = mysql_connect("localhost","root","");
  
  if (!$con) {
  die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db("offlinesurv", $con);
  
  $my_data = mysql_query("SELECT * FROM top_buy_clients");
  
  while($row = mysql_fetch_array($my_data)) {
  echo $row['buy_client'] . "\t" . $row['qty']. "\n";
  }
  
  
  ?&gt; 
  
  &lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt; 
      $(function () {
       var chart;
       $(document).ready(function() {
       chart = new Highcharts.Chart({
          chart: {
            renderTo: 'container',
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
       },
       title: {
            text: 'Browser market shares at a specific website, 2010'
              },
       tooltip: {
            pointFormat: '{series.name}: &lt;b&gt;{point.percentage}%&lt;/b&gt;',
          percentageDecimals: 1
              },
       plotOptions: {
              pie: {
                  allowPointSelect: true,
                  cursor: 'pointer',
                  dataLabels: {
                      enabled: true,
                      color: '#000000',
                      connectorColor: 'green',
                      formatter: function() {
                          return '&lt;b&gt;'+ this.point.name +'&lt;/b&gt;: '+ this.percentage +' %';
                      }
                  }
              }
          },
          series: [{
              type: 'pie',
              name: 'Browser share',
              data: [ &lt;?php echo $row; ?&gt;]
          }]
      });
  });
  
  });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script src="js/highcharts.js"&gt;&lt;/script&gt;
  &lt;script src="js/exporting.js"&gt;&lt;/script&gt;
  
  &lt;div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>