<commit_before># ng2-nvd3
[![Build Status](https://travis-ci.org/krispo/ng2-nvd3.svg?branch=master)](https://travis-ci.org/krispo/ng2-nvd3)
[![NPM Version](http://img.shields.io/npm/v/ng2-nvd3.svg?style=flat)](https://www.npmjs.org/package/ng2-nvd3)

Angular2 component for nvd3. It has similar technique as angular-nvd3 for angular 1, but designed for angular 2 and without extra features (like extended mode) you won't need.

## Install

    npm install ng2-nvd3
    
it requires `angular2`, `d3` and `nvd3` as dependencies.
    
## Basic usage

### typescript
Note: `d3` and `nvd3` should be also included in your project bundle.

Simple discrete bar chart: 
    
```js
import {Component, OnInit} from 'angular2/core';
import {nvD3} from 'ng2-nvd3'
declare let d3: any;<commit_msg>add links<commit_after># ng2-nvd3
[![Build Status](https://travis-ci.org/krispo/ng2-nvd3.svg?branch=master)](https://travis-ci.org/krispo/ng2-nvd3)
[![NPM Version](http://img.shields.io/npm/v/ng2-nvd3.svg?style=flat)](https://www.npmjs.org/package/ng2-nvd3)

Angular2 component for nvd3. It has similar technique as [angular-nvd3](http://krispo.github.io/angular-nvd3) for angular 1, but designed for angular 2 and without extra features (like extended mode) you won't need.

## Demos

Online demos:

1. [web page](http://krispo.github.io/ng2-nvd3)
2. [plnkr](http://plnkr.co/edit/T4i7Zh?p=preview)

## Install

    npm install ng2-nvd3
    
it requires `angular2`, `d3` and `nvd3` as dependencies.
    
## Basic usage

### typescript
Note: `d3` and `nvd3` should be also included in your project bundle.

Simple discrete bar chart: 
    
```js
import {Component, OnInit} from 'angular2/core';
import {nvD3} from 'ng2-nvd3'
declare let d3: any;
{'fraction_non_alphanumeric': 0.14872685185185186, 'fraction_numerical': 0.03530092592592592, 'mean_word_length': 4.32, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2417728', 'n_tokens_mistral': 676, 'n_tokens_neox': 649, 'n_words': 166}