1.0.0 • Published 7 years ago
@xpr/chart v1.0.0
@xpr/chart
@xpr/chart library is an Angular directive wrapping the creating of Chart.js charts. @xpr/chart designed to work with Chart.js configuration.
Temporary README file, more docs soon...
Installation
npm install @xpr/chart@latest --save
Don't forget to install Chart.js (v2)
npm install chart.js --save
npm install @types/chart.js --save-dev
Usage
Import @xpr/chart module:
...
import {XprChartModule} from '@xpr/chart';
@NgModule({
declarations: [...],
imports: [
BrowserModule,
XprChartModule
]
})
export class MyModule {}
Use it in your templates:
@Component({
template: '<div><canvas [xprChart]="myChart"></canvas></div>'
})
export class MyComponent {
myChart: ChartConfiguration = {..};
}
Development
@xpr/chart built using Angular CLI.
ng serve
- run the demo applicationng test
- run the directive testsnpm run build
- build @xpr/chart module into/lib
directory
1.0.0
7 years ago