1.0.0 • Published 7 years ago

@xpr/chart v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

@xpr/chart

Chart.js module for Angular.

@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 application
  • ng test - run the directive tests
  • npm run build - build @xpr/chart module into /lib directory