title: Dynamically change title of a chart in amcharts 4
body: <p>How can I change the title of a loaded chart using javascript? The following doesn't work with external data</p>
  
  <p><a href="https://codepen.io/abdfahim/pen/zYOPvPx" rel="nofollow noreferrer">https://codepen.io/abdfahim/pen/zYOPvPx</a></p>
  
  <pre><code>var chart = am4core.createFromConfig({
      "titles": [
          {
              "text": "ABCD",
              "fontSize": 25,
              "marginBottom": 10
          }
      ],
      "dataSource": {
          "url": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-160/sample_data_serial.json"
      },
      "xAxes": [
          {
              "type": "CategoryAxis",
              "dataFields": {
                  "category": "year"
              }
          }
      ],
      "yAxes": [
          {
              "type": "ValueAxis"
          }
      ],
      "series": [
          {
              "type": "ColumnSeries",
              "name": "Cars",
              "dataFields": {
                  "categoryX": "year",
                  "valueY": "cars"
              }
          }
      ]
  }, "chartdiv", am4charts.XYChart);
  
  function changeTitle()
  {
    chart.titles[0].text = "New Title";
  }
  </code></pre>