import { Component } from
'@angular/core'
;
import { MessageService } from
'primeng/api'
;
import { PrimeNGConfig } from
'primeng/api'
;
@Component({
selector:
'app-root'
,
templateUrl:
'./app.component.html'
,
providers: [MessageService],
})
export class AppComponent {
basicData: any;
basicOptions: any;
constructor(
private messageService: MessageService,
private primengConfig: PrimeNGConfig
) { }
ngOnInit() {
this
.basicData = {
labels: [
'January'
,
'February'
,
'March'
,
'April'
,
'May'
,
'June'
],
datasets: [
{
label:
'2020'
,
data: [65, 59, 80, 81, 56, 55],
tension: 0.4,
backgroundColor: [
'#FF6371'
,
'#36A2EB'
,
'#FFCE45'
,
'#ff6200'
,
'#00ffbf'
,
'#9900ff'
,
],
borderColor:
'#42A5F5'
,
},
],
};
this
.basicOptions = {
title: {
display:
true
,
text:
'Article Views'
,
fontSize: 32,
position:
'top'
,
},
};
}
handleClick(event) {
this
.messageService.add({
severity:
'success'
,
summary:
'GeeksforGeeks'
,
detail:
'Data Item Clicked'
,
});
}
}