title: How can I create a column chart with dynamic data
body: <p>I am using google charts, and I would like to get a column chart with a fixed period, but dynamic values.
  This is an example of a column chart, with fixed values, I would like to use the variables that are in the code after the comment (variables i would like to use) taking into account that columns and values are not always the same size.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>      function drawChart() {
        // Simple example
         var data = google.visualization.arrayToDataTable(
              [ ['Year', 'Example 1', 'Example 2', 'Example 3'],
            ['2004',  1000,      400, 100],
            ['2005',  1170,      460, 500],
          ]); 
          
         // variables i would like to use
         // These variables are fixed
         var periodOne = '2004';
         var periodTwo = '2005';
         
         // non-fixed variables, variables that I will receive and that will not always be the same size.
         var columns = ['Example 1', 'Example 2', 'Example 3'];
         var valuesP1 = [1000, 400, 100];
         var valuesP2 = [1170, 460, 500];
         
    
          
          var options = {
            title: 'Company Performance',
            hAxis: {title: 'Year', titleTextStyle: {color: 'red'}},
                  tooltip: {legend:'none',isHtml:true, textStyle: {color: '#FF0000'}, showColorCode: true}
          };
  
          var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
          chart.draw(data, options);
        }
  
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://www.gstatic.com/charts/loader.js"&gt;&lt;/script&gt;
  &lt;div id="chart_div" style="width: 900px; height: 500px;"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>