title: How do I show each day data of the week in graph?
body: <p>I have a graph that shows the total number of booths booked by a person, but I want to show the number of booths booked by the person in a day of the week. </p>
  
  <p>Below is my code that shows the total booking:</p>
  
  <pre><code>   &lt;?php
     $current_day = date("N");
      $days_to_sat = 6 - $current_day;
     $days_from_sun = $current_day - 0;
    $monday = date("d-m-y", strtotime("- {$days_from_sun} Days"));
      $friday = date("d-m-y", strtotime("+ {$days_to_sat} Days"));
       echo  $monday."&amp;nbsp; To &amp;nbsp;".$friday;
  
  
  
    $c=$_SESSION['user'];
     $sth =mysql_query("SELECT count(`booth_number`) AS 'booth',`sold_by` FROM `registration1` where week(`Date`) = week(curdate()) and where `sold_by`= '$c' ");
  
    $rows = array();
    $flag = true;
    $table = array();
    $table['cols'] = array(
  
    array('label' =&gt; 'sold_by', 'type' =&gt; 'string'),
    array('label' =&gt; 'booth', 'type' =&gt; 'number')
  
    );
  
   $rows = array();
    while($r = mysql_fetch_assoc($sth)) {
    $temp = array();
     $temp[] = array('v' =&gt; (string) $r['sold_by']); 
  
    $temp[] = array('v' =&gt; (int) $r['booth']); 
   $rows[] = array('c' =&gt; $temp);
       }
  
    $table['rows'] = $rows;
    $jsonTable = json_encode($table);
  
   ?&gt;
  
  &lt;!--Load the Ajax API--&gt;
  &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  // Load the Visualization API and the piechart package.
  google.load('visualization', '1', {'packages':['corechart']});
  
  // Set a callback to run when the Google Visualization API is loaded.
  google.setOnLoadCallback(drawChart);
  
  function drawChart() {
  
    // Create our data table out of JSON data loaded from server.
    var data = new google.visualization.DataTable(&lt;?=$jsonTable?&gt;);
   var options = {
       title:" Total Booth Booked ",
        width: 400, height: 200,
  
        minorTicks: 5
      };
    // Instantiate and draw our chart, passing in some options.
    // Do not forget to check your div ID
    var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
    chart.draw(data, options);
  }
  &lt;/script&gt;
  
  &lt;!--this is the div that will hold the pie chart--&gt;
  &lt;div id="chart_div"&gt;&lt;/div&gt;
  </code></pre>