title: How to Use D3 charts with angular 2 or 4
body: <p>I want to use D3 charts in one of my projects please help.</p>
  
  <p>I tried following the installation process. but it's not working properly peasen provide me another solution so can implement it in the existing project.</p>
  
  <pre><code>npm install d3-ng2-service --save
  
  import { BrowserModule } from '@angular/platform-browser';
  import { NgModule, ApplicationRef } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { FormsModule } from '@angular/forms';
  import { AppComponent } from './app.component';
  
  import { D3Service } from 'd3-ng2-service'; // &lt;-- import statement
  
  @NgModule({
    declarations: [
      AppComponent,
      TestD3Component // &lt;-- declaration of the D3 Test component used below
    ],
    imports: [
      BrowserModule,
      CommonModule,
      FormsModule
    ],
    providers: [D3Service], // &lt;-- provider registration
    entryComponents: [AppComponent],
    bootstrap: [AppComponent]
  })
  export class AppModule {
  
  }
  </code></pre>