I am using NPM ng2modules-easypiechart for ionic project
Import the module app.maodule.ts
import { EasyPieChartModule } from 'ng2modules-easypiechart';
imports: [
EasyPieChartModule
]
I am using the easyPieChart directive in my component template but the chart is not appearing.
Html
<easy-pie-chart [percent]="percent" [options]="options"></easy-pie-chart>
Component
import 'easy-pie-chart/dist/easypiechart.js';
@Component({
selector: 'page-transactiontype',
templateUrl: 'TransactionDetails.html'
})
export class TransactionDetails {
public percent: number;
public options: any;
constructor() {
this.percent = 80;
this.options = {
barColor: '#ef1e25',
trackColor: '#f9f9f9',
scaleColor: '#dfe0e0',
scaleLength: 5,
lineCap: 'round',
lineWidth: 3,
size: 110,
rotate: 0,
animate: {
duration: 1000,
enabled: true
}
};
}
}