title: google visualization graph type stacked true not working
body: <p>how can I display stacked column graph without using chart type only use id name and I want to display two different variables using one function... is there any problem with stacked column true in option variable? let me know how to optimize my code by using different variable data with same function use without using switch case 
  ??</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>google.charts.load('current', {
    packages: ['corechart']
  }).then(function () {
    var charts = {};
    var options = {
         isStacked: true,
        chartArea: {
          height: '100%',
          width: '100%',
          top: 24,
          left: 64,
          right: 32,
          bottom: 48,
        },
        tooltip: {
          valueDecimals: 2,
          valueSuffix: ' USD',
          valuePrefix: '$'
        },
        vAxis: { 
          title: 'Cost in USD ($)', format:'$#',
        },
        height: '100%',
        legend: {
          position: 'bottom'
        },
        pointSize: 4,
        width: '100%'
      
    };
    //  daily and monthly  stacked columns charts data
    var jsonData = [{"name":"product a","data":[["2018-03-01",18.89034482758612],["2018-03-02",18.89268292682916],["2018-03-05",18.89324503311252],["2018-03-07",18.89268292682916],["2018-03-10",18.89377777777766],["2018-03-11",18.893525179856],["2018-03-12",18.89359999999988],["2018-03-13",18.89311475409824],["2018-03-14",18.89311475409824],["2018-03-15",18.89294117647046],["2018-03-16",18.89272727272716],["2018-03-17",18.89387173396662],["2018-03-18",18.89366292134818],["2018-03-19",18.8923456790122]]},{"name":"product b","data":[["2018-03-01",10.99034482758612],["2018-03-02",1.99268292682916],["2018-03-05",16.99324503311252],["2018-03-07",12.99268292682916],["2018-03-10",12.99377777777766],["2018-03-11",11.993525179856],["2018-03-12",10.99359999999988],["2018-03-13",18.99311475409824],["2018-03-14",18.99311475409824],["2018-03-15",18.99294117647046],["2018-03-16",18.99272727272716],["2018-03-17",18.99387173396662],["2018-03-18",18.99366292134818],["2018-03-19",18.9923456790122]]}];
    loadData(jsonData, '1' );
  
    var dailystacked = [{"name":"product a","data":[["2018-03-01",18.89034482758612],["2018-03-02",18.89268292682916],["2018-03-05",18.89324503311252],["2018-03-07",18.89268292682916],["2018-03-10",18.89377777777766],["2018-03-11",18.893525179856],["2018-03-12",18.89359999999988],["2018-03-13",18.89311475409824],["2018-03-14",18.89311475409824],["2018-03-15",18.89294117647046],["2018-03-16",18.89272727272716],["2018-03-17",18.89387173396662],["2018-03-18",18.89366292134818],["2018-03-19",18.8923456790122]]},{"name":"product b","data":[["2018-03-01",18.99034482758612],["2018-03-02",18.99268292682916],["2018-03-05",18.99324503311252],["2018-03-07",18.99268292682916],["2018-03-10",18.99377777777766],["2018-03-11",18.993525179856],["2018-03-12",18.99359999999988],["2018-03-13",18.99311475409824],["2018-03-14",18.99311475409824],["2018-03-15",18.99294117647046],["2018-03-16",18.99272727272716],["2018-03-17",18.99387173396662],["2018-03-18",18.99366292134818],["2018-03-19",18.9923456790122]]}];
    loadData(dailystacked, '2');
  
    // load json and dailystacked data
    function loadData(jsonData, id) {
      // create data table
      var dataTable = new google.visualization.DataTable();
      dataTable.addColumn('date', 'Date'); 
      
         // add date column
         $.each(jsonData, function(productIndex, product) {
        // add product column
        var colIndex = dataTable.addColumn('number', product.name);
  
        // add product data
        $.each(product.data, function(dataIndex, data) {
          var rowIndex = dataTable.addRow();
          dataTable.setValue(rowIndex, 0, new Date(data[0]));
          dataTable.setValue(rowIndex, colIndex, data[1]);
        });
      });
       
      // draw chart
      $(window).resize(function () {
        drawChart(id,  dataTable);
      });
      drawChart(id, dataTable);
    }
    // draw chart
    function drawChart(id, dataTable) {
      if (!charts.hasOwnProperty(id)) {
        charts[id] = new google.visualization.ChartWrapper({
          'containerId': 'chart-' + id,
           'chartType': 'ColumnChart',
           
          options:
         {
          'isStacked'   : 'true',
          
      },
        });
      }
      charts[id].setDataTable(dataTable);
      charts[id].draw();
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html, body {
    height: 100%;
    margin: 0px 0px 0px 0px;
    overflow: hidden;
    padding: 0px 0px 0px 0px;
  }
  
  .chart {
    display: inline-block;
    height: 100%;
    width: 60%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://www.gstatic.com/charts/loader.js"&gt;&lt;/script&gt;
  &lt;div class="chart" id="chart-1"&gt;&lt;/div&gt;
  &lt;div class="chart" id="chart-2"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>