title: How can I change the minimum value of the vertical axis with apps script in a embeddedchart (google sheets)?
body: <p>I have 'manually' created a chart in google sheets by selecting a range and inserting a stacked column chart:</p>
  
  <p><a href="https://i.stack.imgur.com/IbK00.png" rel="nofollow noreferrer">manual chart</a></p>
  
  <p>I changed  the vertical axis minimum value to 79.000.000.</p>
  
  <p>However, I would like to automate this process. So, therefore I wrote a little script:</p>
  
  <pre><code> /**
   * @OnlyCurrentDoc
   */
  
  function buildChart() {
    // Get the sheet
    var sheet = SpreadsheetApp.getActiveSheet()
  
    //Create new chart
    var chart = sheet.newChart()
      .setChartType(Charts.ChartType.COLUMN)
      .addRange(sheet.getRange("D1:H8"))
  
      .setPosition(10, 10, 0, 0)
      //.setOption('title', 'Cost Price Development - Stage 3')
      .setOption('isStacked', 'TRUE')
      .setOption('colors', ['tranparant', '#93CCEA', 'green', 'black'])
      .setOption('vAxis.title', 'test test')
      //.setOption('vAxis', {'title': 'Something Here'})
      //.setOption('vAxis.viewWindowMode', 'explicit')  
      .setOption('vAxis.viewWindow.min', 79000000)
      //.setOption('vAxis.textStyle.fontSize',8)
      .build();
  
    // Insert chart in sheet
    sheet.insertChart(chart);
  }
  </code></pre>
  
  <p>With the line </p>
  
  <pre><code>.setOption('vAxis.viewWindow.min', 79000000)
  </code></pre>
  
  <p>I want to change the minimum value of the vertical axis. However, the vertical axis does still start at 0 instead op 79.000.000.</p>
  
  <p>I have also tried:</p>
  
  <pre><code> .setOption('vAxis.minValue', 79000000)
  </code></pre>
  
  <p>which does not help either: the code above results in the following chart:</p>
  
  <p><a href="https://i.stack.imgur.com/ZxijW.png" rel="nofollow noreferrer">chart with apps script</a></p>