title: Modifying Charts Without Changing It's Properties
body: <p>I am doing a script to change some data in a chart (the title in this example) and when I run this function i'ts changing some properties on it and the chart changes completely.</p>
  
  <p>This is the code I am using:</p>
  
  <pre><code>function ChangeChart() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Test');
  var chart = sheet.getCharts()[0];
  chart = chart.modify()
    .setOption('title', 'Title Test')
    .build();
  sheet.updateChart(chart);
  }
  </code></pre>
  
  <p>This is how the chart looked before I run the script:
  <a href="https://i.stack.imgur.com/rZgXT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rZgXT.png" alt="enter image description here"></a></p>
  
  <p>And after:
  <a href="https://i.stack.imgur.com/gtUGK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gtUGK.png" alt="enter image description here"></a></p>
  
  <p>I am using this data range:</p>
  
  <p><a href="https://i.stack.imgur.com/5c4Gn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5c4Gn.png" alt="enter image description here"></a></p>
  
  <p>And this is the properties before and after I run the function:
  <a href="https://i.stack.imgur.com/feEaV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/feEaV.png" alt="enter image description here"></a></p>