title: Creating graphs with google apps script Charts Service produces low quality images
body: <p>When I create a chart programatically, transform into an image and append to a document, the quality of the image is inferior to than one created directly on the document (manually).</p>
  
  <p>Any ideas if this can be fixed?</p>
  
  <p>This is how I am creating it</p>
  
  <pre><code>var dataTable = Charts.newDataTable()
        .addColumn(Charts.ColumnType.STRING, 'Área')
        .addColumn(Charts.ColumnType.NUMBER, '# sessões')
  
    var i = 1;
    var extra = 0;
    var data = []
    for(var r in users_sessions_area) {
      var current = users_sessions_area[r] 
      if(i &lt;= 5 &amp;&amp; current.area &amp;&amp; current.area != '') {
        dataTable.addRow([current.area, Number(current.sessions)]);
        data.push([current.area, Number(current.sessions)]);
      } else {
        extra += Number(current.sessions);
      }
      i++;
    }
  
    if(extra &gt; 0) {
      dataTable.addRow(["Outras", extra]);
      data.push(["Outras", extra]);
    }
  
    sheet.getRange("A2:B" + (data.length + 1)).setValues(data);
  
    var chart = sheet.getCharts()[0];
  
    var graphData = Charts.newPieChart().setDataTable(dataTable);
    graphData.setTitle("% sobre o total de sessões");
    graphData.setLegendPosition(Charts.Position.BOTTOM);
  
    var chart = graphData.build();
    return chart.getAs('image/png');
  </code></pre>
  
  <p>And then adding it to the doc</p>
  
  <pre><code>  body.findText("%%SESSION_AREAS_CHART%%").getElement().getParent().asParagraph().appendInlineImage(createSessionsPerAreaChart(variables));
  
  </code></pre>