Official Angular 2 plugin for amCharts V3

Downloads in past


99781.2.17 years ago7 years agoMinified + gzip package size for amcharts3-angular2 in KB


Official Angular plugin for amCharts V3
npm install amcharts/amcharts3-angular2 --save
How to use
1) In your HTML file, load the amCharts library using <script> tags:
<script src=""></script>
<script src=""></script>
<script src=""></script>

2) In your app module, import the AmChartsModule module and add it to the imports:
import { AmChartsModule } from "amcharts3-angular2";

  imports: [
export class AppModule {}

3) Inject the AmChartsService into your app component, create a <div> element with an id, then use the makeChart method to create the chart:
import { AmChartsService } from "amcharts3-angular2";

  template: `<div id="chartdiv" [style.width.%]="100" [style.height.px]="500"></div>`
export class AppComponent {
  private chart: any;

  constructor(private AmCharts: AmChartsService) {}

  ngOnInit() {
    this.chart = this.AmCharts.makeChart("chartdiv", {
      "type": "serial",
      "theme": "light",
      "dataProvider": []

  ngOnDestroy() {

The first argument to makeChart must be the same as the <div>'s id. The id can be whatever you want, but if you display multiple charts each chart must have a different id
When you are finished with the chart, you must call the destroyChart method. It's good to put this inside the ngOnDestroy method.
5) If you want to change the chart after the chart has been created, you must make the changes using the updateChart method:
// This must be called when making any changes to the chart
this.AmCharts.updateChart(this.chart, () => {
  // Change whatever properties you want, add event listeners, etc.
  this.chart.dataProvider = [];

  this.chart.addListener("init", () => {
    // Do stuff after the chart is initialized

You can see some examples in the examples directory.



  • Adding in support for Angular 4
  • Deprecating the <amCharts> element in favor of the new AmChartsService


  • Various fixes
  • Adding examples


  • Initial release