ngx-doughnut-chart

`ngx-doughnut-chart` is a light weight with no dependencies angular component to draw donut charts using svgs.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
ngx-doughnut-chart
0.0.44 years ago4 years agoMinified + gzip package size for ngx-doughnut-chart in KB

Readme

ngx-doughnut-chart
ngx-doughnut-chart is a light weight with no dependencies angular component to draw donut charts using svgs.

Installation

All you need to do is to run the following command: ```bash $ npm i ngx-doughnut-chart --save ``` or ```bash $ yarn add ngx-doughnut-chart --save ```

Usage

Import NgxDonutChartModule module into your main module and add it to imports: ```typescript import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { NgxDonutChartModule } from 'ngx-doughnut-chart'; @NgModule({ declarations:
AppComponent
, imports:
BrowserModule,
NgxDonutChartModule
, providers: , bootstrap: AppComponent }) export class AppModule { } ... Pass data like this: ```typescript donutChartData = {
label: 'Liverpool FC',
value: 5,
color: 'red',
}, {
label: 'Real Madrid	',
value: 13,
color: 'black',
}, {
label: 'FC Bayern München',
value: 5,
color: 'blue',
},
; ``` and then use the component in your html like: ```html data="donutChartData" title="'Sessions'" radius="88" thickness="10" margin="30"> ```

License

MIT © ahmedbassell