title: update amcharts data in angular-amcharts
body: <p>I am using <code>amchart</code> to render a chart with JSON data which is an API response data,
  and its working perfectly. Now I have to update the data on the basis of a selection dropdown which make a API call request to get the response JSON, which is also done now after getting the response data I don't know how to update the chart with the</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.changeYearFunction = function(){
    console.log($scope.selectedYear);
    chartService.getDataByMonth($scope.selectedYear).then(function(response){
      $scope.monthdata = response.data;
   $scope.$apply();
    })
  }
  $scope.monthChart = function(year){
    chartService.getDataByMonth('2016').then(function(response){
      $scope.monthdata = response.data;
   $scope.finishloading = true;
   console.log($scope.monthdata);
   $scope.amChartOptions = {
    data : $scope.monthdata,
    type: "serial",
    theme: "light",
    marginRight: 80, 
    balloon: {
      cornerRadius: 6,
      horizontalPadding: 15,
      verticalPadding: 10
    },
    chartScrollbar: {
      enabled: true,
    },
    valueAxes: [{
      gridAlpha: 0.5,
      gridColor: '#dddddd',
    }],
    graphs: [{
      bullet: 'square',
      bulletBorderAlpha: 1,
      bulletBorderThickness: 1,
      fillAlphas: 0.5,
      //fillColorsField: 'lineColor',
      legendValueText: '[[value]]',
      //lineColorField: 'lineColor',
      title: 'power',
      valueField: 'power'
    }],
    chartCursor: {
      //categoryBalloonDateFormat: 'MMM',
       cursorAlpha: 0,
       fullWidth: true
    },
      //dataDateFormat: "MM",
      categoryField: "month",
    export: {
      enabled: true
    }      
     }
     })
   }();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="panel-heading"&gt;&lt;span&gt;Monthly Consumption&lt;/span&gt;
   &lt;select ng-model="selectedYear" ng-change="changeYearFunction()"&gt;
    &lt;option ng-repeat="x in year" value={{x}}&gt;{{x}}&lt;/option&gt;
   &lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="panel-body"&gt;
   &lt;div style="height: 450px; width: 100%;"&gt;
    &lt;am-chart ng-if="finishloading" id="myAreaChart" options="amChartOptions"&gt;&lt;/am-chart&gt;
   &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>