title: AmCharts dynamic columns based on data
body: <p>I need to display AmCharts column chart with following data</p>
  
  <pre><code>   [
      {
          month: "2017-03",
          source: "TRW",
          turnover: 0,
          target: 1
      },
      {
          month: "2017-04",
          source: "TRW",
          turnover: 2.22,
          target: 1
      },
      {
          month: "2017-03",
          source: "CON",
          turnover: 7.27,
          target: 1
      },
      {
          month: "2017-04",
          source: "CON",
          turnover: 1.53,
          target: 1
      }
  ]
  </code></pre>
  
  <p>Requirement is to group columns by the source (ex: TRW, CON) data while using month (ex: 2017-03, 2017-04 ) as the category axis </p>
  
  <p>Please look at <a href="https://i.stack.imgur.com/kzW5m.png" rel="nofollow noreferrer">this picture</a> which displays the desired chart.</p>
  
  <p>Problem is I need the columns to be added dynamically based on the source data values (ex: source: "CON")</p>
  
  <p>Every example I found on the internet shows that I need to add separate field in JSON for every column. 
  for example </p>
  
  <pre><code>[
      { 
          "month": " 2017-03 ", 
          "TRW": 0, 
          "CON": 7.27, 
          "target": 1 
      },
      { 
          "month": " 2017-04 ", 
          "TRW": 2.22, 
          "CON": 1.53, 
          "target": 1 
      }
  ]
  </code></pre>
  
  <p>The project is API based and the JSON data set at the top is what I get from the API. In the future more sources may be added other than the existing two sources (ex: TRW, CON) <br/>
  That is the main reason I need this columns to be auto populated based on the data. <br/><br/> 
  Appreciate any support on this. </p>
  
  <p><strong>Thanks @xorspark</strong> <br/>
  <a href="https://i.stack.imgur.com/HT4jJ.png" rel="nofollow noreferrer">This</a> is how it looks after applying your solution. <br/> </p>