angular-simple-gauge
Simple gauge component for Angular2
Installation
You can install angular-simple-gauge by using npm.
npm install angular-simple-gauge
Usage
Plunker demo: https://plnkr.co/edit/GzUAtv?p=preview
Add angular-simple-gauge
to your module, eg.
import { AngularSimpleGauge } from 'angular-simple-gauge'; @NgModule({ declarations: [AngularSimpleGauge] // ...})export class AppModule {}
And you can use selector <angular-simple-gauge>
in your template:
<angular-simple-gauge [value]="value" [max]="max" [min]="min" [colors] ="colors" [background] = "background">
[value]
number Set current value.
max
number Set maximum value.
min
number Set maximum value.
colors
string Set scale colors.
[ {\"color\": \"rgb(214,40,0)\", \"from\": 0, \"to\": 45 }, {\"color\": \"rgb(255,207,33)\", \"from\": 45, \"to\": 80 }, {\"color\": \"rgb(132,174,49)\", \"from\": 80, \"to\": 100 } ]
background
string Set background template. background = "../node_modules/angular-simple-gauge/resources/default1.png";
License
The project is released under the MIT license.
Contact
The project's website is located at https://github.com/??? Author: Bijnens, Tommy (TommyBijnens@gmail.com)