@reibo/ngx-chartjs
v0.1.0
Published
[](https://www.npmjs.com/package/%40reibo%2Fngx-chartjs)  [
export class MyModule {}
####Usage in your html
<ngx-charts
[datasets]="data"
[labels]="labels"
[options]="options"
[legend]="legend"
[colors]="chartColors"
[chartType]="chartType"></ngx-charts>One component can be used for all chart types of chart.js
datasets(Array<{data: Array<number[]> | number[], label: string}>) - set of points of the chartlabels(?Array<any>) - x axis labels. It's necessary for charts:line,barandradar. And just labels (on hover) for charts:polarArea,pieanddoughnutchartType(?string) - indicates the type of charts, it can be:line,bar,radar,pie,polarArea,doughnutoptions(?any) - chart options (as from Chart.js documentation)colors(?Array<any>) - data colors, will use default and|or random colors if not specified (see below)legend: (?boolean=false) - if true show legend below the chart, otherwise not be shown
Colors
There are a set several default colors. Colors can be replaced using the colors attribute. If there is more data than colors, colors are generated randomly.
