ng2modules-flot
Angular 2 wrapper for flot plugin.
Get Started
installation
- Install
ng2modules-flot
using npm
$ npm i ng2modules-flot
- Install
flot
library and plugins using bower
$ bower install flot flot-spline flot.tooltip
- Include
flot
library and plugins in application viahtml
,angular-cli
orwebpack
. Note thatflot
depends onjquery
.
// this is for flot-spline plugin // this is for flot.tooltip plugin
Usage
Import the module to your module:
; // In your app's moduleimports: flotModule
Use the flot directive into your component template:
@ public dataset: any; public options: any; { thisdataset = label: "line1" data: 1 130 2 40 3 80 4 160 5 159 6 370 7 330 8 350 9 370; thisoptions = series: lines: show: true points: radius: 3 show: true ; }
Options
For options see [https://github.com/flot/flot/blob/master/API.md]