title: formatting trendline using setoption() in google apps script
body: <p>I am using Google Apps Script to create a scatterplot with a trendline.  <a href="https://developers.google.com/chart/interactive/docs/gallery/trendlines#Example4" rel="nofollow">I have taken an idea from Google Charts API on how to create the trendline</a>, and this has been successful.  But, the approach to <em>formatting the trendline</em> does not work as the Charts API describes.  I have used setOption("trendlines", "0: {}") to create my trendline, but it does not matter what I put in between the curly brackets, the formatting that I add there doesn't seem to work.  I would  like the trendline to have smaller points than the actual, plotted points of the scatterplot, and I would like the trendline series to be black.  If I can successfully format the trendline, then this would solve the problem of many high school science teachers who are trying to use Google Drive as a real alternative to Excel in their classes.</p>
  
  <p>This is my code:</p>
  
  <pre><code>function scatterMe(){
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheets()[0];
  
    var chart = sheet.newChart().asScatterChart()
    .addRange(sheet.getRange("A1:B500"))
    .setPosition(5, 5, 0, 0)
  
    //this is the code that builds the trendline... the example CSS code at 
    //https://developers.google.com/chart/interactive/docs/gallery/trendlines
    //does not seem to have any effect when I add it in between the curly braces.
    .setOption('trendlines', '0: {}')
  
    .build();
  
    sheet.insertChart(chart);
  }
  </code></pre>