title: Google charts - draw chart with variable parameters
body: <p>I was trying to create a chart using google charts with some parameters passed to that function. I am using those parameters to populate the data. But it is not working. Is it possible to make that function with parameters as i dont know what happens inside google.charts.setOnCallback() method?</p>
  
  <pre><code>google.charts.load('current', {'packages':['corechart']});
  google.charts.setOnLoadCallback(drawChart);
  
  function drawChart(scoreForEachSkill, skillList) {
  
  var data = new google.visualization.DataTable();
  data.addColumn('string','Skill');
  data.addColumn('number','Score');
  for(var i=0;i&lt; scoreForEachSkill.length;i++)
  {
      data.addRow(skillList[i],scoreForEachSkill[i]);
  }
  
  var options = {'title':'Skills', 'width':610, 'height':390};
  var chart = new 
  google.visualization.PieChart(document.getElementById('pieChart'));
  chart.draw(data, options);
  }
  </code></pre>
  
  <p>The html and css part</p>
  
  <pre><code>&lt;div id="pieChart" style="margin-left:-10px;margin-right:-10px;"&gt;&lt;/div&gt;
  </code></pre>