Merge pull request #7 from Pear-Trading/TBSliver/Extra-Widgets
Added extra widgets and fixed api issue
This commit is contained in:
commit
00d713fff0
2 changed files with 24 additions and 2 deletions
|
@ -39,6 +39,28 @@ export class DashboardComponent implements OnInit {
|
|||
icon: 'icon-people',
|
||||
title: 'Customers Last 30 Days',
|
||||
},
|
||||
{
|
||||
type: 'graph',
|
||||
name: 'sales_last_7_days',
|
||||
icon: 'icon-diamond',
|
||||
title: 'Sales Last 7 Days',
|
||||
},
|
||||
{
|
||||
type: 'graph',
|
||||
name: 'sales_last_30_days',
|
||||
icon: 'icon-diamond',
|
||||
title: 'Sales Last 30 Days',
|
||||
},
|
||||
{
|
||||
type: 'graph',
|
||||
name: 'purchases_last_7_days',
|
||||
title: 'Purchases Last 7 Days',
|
||||
},
|
||||
{
|
||||
type: 'graph',
|
||||
name: 'purchases_last_30_days',
|
||||
title: 'Purchases Last 30 Days',
|
||||
},
|
||||
];
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -83,8 +83,8 @@ export class GraphWidget implements OnInit {
|
|||
}
|
||||
|
||||
private setData(data: any) {
|
||||
this.setChartData(data.count);
|
||||
this.setChartLabels(data.day);
|
||||
this.setChartData(data.data);
|
||||
this.setChartLabels(data.labels);
|
||||
}
|
||||
|
||||
private setChartData(data: Array<number>) {
|
||||
|
|
Reference in a new issue