0.1.1 • Published 4 years ago

@ngx-chart/doughnut v0.1.1

Weekly downloads
67
License
GNU 2
Repository
github
Last release
4 years ago

@ngx-chart/doughnut

Angular library for draw doughnut charts.

Table of Contents

Installation

Install @ngx-chart/doughnut

npm i @ngx-chart/doughnut --save

Documentation

Doughnt

npm.io npm.io npm.io

Params
paramtypedescription
valuesarrayArray of values to represent.
colors?arrayColor of segments of doughnt. If there isn't colors are applied random colors.
paddingbooleanDraw padding between doughnut segments.
labelsobject
labels.positionstringSet the position of labels. Allowed values are 'internal' or 'external'.
labels.titlesarrayArray of titles of labels
Usage:
@ app.module.ts

...
import { DoughnutGraphModule } from '@ngx-chart/doughnut-graph';
...

@NgModule({
    ...
    imports: [
        ...
        DoughnutGraphModule
    ],
    ...
})
@ file.component.ts

...
ngOnInit() {
    this.DoughnutData = {
        values: [32, 24, 21, 46],
        colors: ['red', 'blue', 'yellow', 'green']
    };
}
...
@ file.html

<ngl-doughnut
    style="width: 200px; height: 100px; display: block;"
    [graphData]="DoughnutData"
></ngl-doughnut>

License

GNU 2.0