Angular 2 Component for FusionCharts

A simple and effective Angular module for FusionCharts JavaScript charting library.

Download Free Trial

Create pie, column, area, line, radar, marimekko and over 150 other Angular charts for your web application. Using FusionCharts’ Angular Directive you can create charts which are responsive, interactive, and, support zooming, panning, APIs, animation, drill-downs, real-time updates, and even full exporting of charts & dashboards.

It also comes with event support for mouse, keyboard, and more, enabling you to add charts in runtime during any lifecycle phase of the application. All charts and dashboards made on FusionCharts’ Angular Directive are mobile first by default, and responsive across all devices. Further, all charts & graphs are tested and built for millions of data points, without any performance issues. Finally, the Angular Directive is completely open source and actively maintained by a team of dedicated developers to ensure that all the latest versions of Angular JS are always supported.


  • Insert a chart with just a single directive.
  • Keep all your chart elements in sync with native support for Data Binding.
  • Call controller functions directly from the chart using .Angular-friendly events.
  • Enjoy advanced control with complete access to the full FusionCharts object.
  • Add charts in a variety of ways from JSON URL to Scope Array Binding.

Quick Demo

Simple chart
Quick demo

Quick Start

Step 1 : Install the FusionCharts Angular module

In the terminal run the following command:

$ npm install angular-fusioncharts --save

Also install FusionCharts, if it is not already installed:

$ npm install fusioncharts --save

Step 2 : Import the Angular FusionCharts module

In the root Angular @NgModule import FusionCharts module from angular-fusioncharts and add the FusionCharts module as a dependency.

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

// Import angular-fusioncharts
import { FusionChartsModule } from 'angular-fusioncharts';

// Import FusionCharts library
import * as FusionCharts from 'fusioncharts';

// Load FusionCharts Individual Charts
import * as Charts from 'fusioncharts/fusioncharts.charts';

// Use fcRoot function to inject FusionCharts library, and the modules you want to use
FusionChartsModule.fcRoot(FusionCharts, Charts)

  declarations: [
  imports: [
    FusionChartsModule // Include in imports
  bootstrap: [AppComponent]
export class AppModule { }

Step 3 : Render your chart

In the template, add a <fusioncharts> directive in the section where you wish to render the chart. We are assuming it's AppComponent which would change based on your usage.

import { Component } from '@angular/core';

    selector: 'my-app',
    template: `<fusioncharts
      [dataSource]="data" >
export class AppComponent {
  data: Object;

  constructor() { = {
      chart: { },
      data: [
        {value: 500},
        {value: 600},
        {value: 700}

Usage and integration of FusionTime

From fusioncharts@3.13.3-sr.1 and angular-fusioncharts@3.0.0, You can visualize timeseries data easily with angular. Learn more about FusionTime here.

In app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { FusionChartsModule } from 'angular-fusioncharts';
import * as FusionCharts from 'fusioncharts';
import * as Charts from 'fusioncharts/fusioncharts.charts';
import * as TimeSeries from 'fusioncharts/fusioncharts.timeseries';

FusionChartsModule.fcRoot(FusionCharts, Charts, TimeSeries);
  declarations: [AppComponent],
  imports: [
  providers: [],
  bootstrap: [AppComponent]
export class AppModule {}

In app.component.ts

import { Component } from '@angular/core';
import * as FusionCharts from 'fusioncharts';
const dataUrl =
const schemaUrl =
  selector: 'app',
  templateUrl: './app.component.html'
export class AppComponent {
  dataSource: any;
  type: string;
  width: string;
  height: string;
  constructor() {
    this.type = 'timeseries';
    this.width = '400';
    this.height = '400';
    this.dataSource = {
      data: null,
      yAxis: {
        plot: [{ value: 'Sales' }]
      caption: {
        text: 'Online Sales of a SuperStore in the US'
  fetchData() {
    let jsonify = res => res.json();
    let dataFetch = fetch(dataUrl).then(jsonify);
    let schemaFetch = fetch(schemaUrl).then(jsonify);
    Promise.all([dataFetch, schemaFetch]).then(res => {
      let data = res[0];
      let schema = res[1];
      let fusionTable = new FusionCharts.DataStore().createDataTable(
      ); // Instance of DataTable to be passed as data in dataSource = fusionTable;

Template code



FusionCharts Angular component is open-source and distributed under the terms of the MIT/X11 License. You will still need to download and include FusionCharts in your page. This project provides no direct functionality. You can download a free evaluation version. However, You will need to purchase a FusionCharts license to use in a commercial environment (FusionCharts is free for non-commercial and personal use).