1.1.3 • Published 7 years ago

ng2-ring-chart v1.1.3

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

Ring Chart for Angular

Simple module to create customisable ring chart

Getting started

Install via npm :

npm install ng2-ring-chart --save

Then include the RingChart module in your app module.

import { RingChartModule } from 'ng2-ring-chart';

@NgModule({
  imports: [
    BrowserModule,
    RingChartModule,
    ...
  ]
  ...
})
export class AppModule {}

Now you just have to use the component where you need it :

  <app-ring-chart [label]="'label name'" [value]="58"></app-ring-chart>

If you use System.js loading in developpement, configure the module path like for other Angular modules :

System.config({
    ...
    map: {
      '@angular/core': 'node_modules/@angular/core/bundles/core.umd.js',
      ...
      'ng-ring-chart': 'node_modules/ng-ring-chart/bundles/ringChart.umd.js'
    }
    ...
});

API

The following is the list of variables that you can override :

  • label: 'label Name'
  • value: default: 0
  • step: default: 3
  • color: default: "#F13502"
  • tooltip: default: true

AoT and Universal support

This module supports AoT pre-compiling and Universal server-side rendering.

Changelog

Changelog available here.

Roadmap

  • Unit tests

License

MIT