And here is the examples page.
How to install
line-chart.csswherever you want
- Reference them in your index.html file
- Reference the module in your app file : angular.module('myApp', [ 'n3-charts.linechart' ])
How to use
A line chart is called using this syntax :
The line chart directives needs two attributes :
options. If one is missing, nothing happens.
Your data should look like this :
Note : only
xis supported as an abscissas key.
Options must be an object with a series array. It should look like this :
series key must be an array which contains objects with the following properties :
y: mandatory, defines which property on each data row will be used as ordinate value.
color: mandatory, any valid HTML color.
axis: optional, can be either 'y' (default, for left) or 'y2' (for right). Defines which vertical axis should be used for this series. If no right axis is needed, none will be displayed.
type: optional, can be one value between 'line', 'area', 'column'. Default is 'line'.
Additionally, you can set
lineMode to a value between these :
- linear (default)
For more information about interpolation, please consult the D3.js documentation about that.
AngularJS is designed to be testable, and so is this project.
This will install karma (and other stuff, I guess)
And this will run the awesome karma testrunner. In the also awesome PhantomJS headless browser. There is so much awesomeness in here.