ngx-ezpie
v0.0.3
Published
An Angular Module to make use of [easy-pie-chart.js library](https://github.com/rendro/easy-pie-chart).
Downloads
5
Readme
NgxEzpie Module
An Angular Module to make use of easy-pie-chart.js library.
How to use
1. Install package
npm install ngx-ezpie easy-pie-chart --save
// or
yarn add ngx-ezpie easy-pie-chart
2. Add module
E.g. to app module
...
import {NgxEzpieModule} from 'ngx-ezpie';
@NgModule({
declarations : [
AppComponent,
],
imports : [
BrowserModule,
NgxEzpieModule, // <--- Add module here
],
providers : [],
bootstrap : [ AppComponent ]
})
export class AppModule {
}
3. Use it
E.g. in app component
<div>
<h2>Easy Pie Chart</h2>
<easypie [percent]="percent" [options]="myopts"></easypie>
</div>
@Component({
selector : 'app-root',
templateUrl : './app.component.html',
styleUrls : [ './app.component.scss' ]
})
export class AppComponent {
percent: number = 78;
myopts: any = {
size : 100,
rotate: 0,
barColor: 'purple',
trackColor: 'blue',
lineWidth: 3,
};
}
4. Further options
Refer to easy-pie-chart options