title: Unable to add value to the google pie chart
body: <pre><code> $(document).ready(function(){
   name1= $("#party1_name").val();
   count1=$("#party1_count").val();
   name2= $("#party2_name").val();
  var  count2=$("#party2_count").val();
   name3= $("#party3_name").val();
   count3=$("#party3_count").val();
  
  
  
  
  // Load google charts
  google.charts.load('current', {'packages':['corechart']});
  google.charts.setOnLoadCallback(drawChart);
  
  // Draw the chart and set the chart values
  function drawChart() {
    alert("Value: " + count2);
   var value1=count1;
   var value2=2;
    var data = google.visualization.arrayToDataTable([
    ['Task', 'Hours per Day'],
    [name1, value1],
    [name2, value2],
    [name3, 4],
    ['Gym', 2],
    ['Sleep', 8]
  ]);
  
    // Optional; add a title and set the width and height of the chart
    var options = {'title':'Result Analysis', 'width':550, 'height':400};
  
    // Display the chart inside the &lt;div&gt; element with id="piechart"
    var chart = new google.visualization.PieChart(document.getElementById('piechart'));
    chart.draw(data, options);
  }
   });
  </code></pre>
  
  <p>When m taking data from the input field and adding data to dataarray like value1 variable. Nothing is displayed in the chart. but when adding value2 variable its working. i have tested using alert.. and m getting the right value but no data is displayed.</p>
  
  <p>this how m adding data to the input field.</p>
  
  <pre><code> &lt;input type="text" id="party1_name" value="&lt;?=$party_name1?&gt;"&gt;
   &lt;input type="number" id="party1_count" value="&lt;?=$count_part1?&gt;"&gt;
   &lt;input type="text" id="party2_name" value="&lt;?=$party_name2?&gt;"&gt;
   &lt;input type="text" id="party2_count" value="&lt;?=$count_part2?&gt;"&gt;
   &lt;input type="text" id="party3_name" value="&lt;?=$party_name3?&gt;"&gt;
   &lt;input type="text" id="party3_count" value="&lt;?=$count_part3?&gt;"&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jXbee.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jXbee.png" alt="this is chart output"></a> </p>