Merge pull request #7 from Pear-Trading/TBSliver/Extra-Widgets

Added extra widgets and fixed api issue
This commit is contained in:
Tom Bloor 2017-09-05 12:05:26 +01:00 committed by GitHub
commit 00d713fff0
2 changed files with 24 additions and 2 deletions

View file

@ -39,6 +39,28 @@ export class DashboardComponent implements OnInit {
icon: 'icon-people', icon: 'icon-people',
title: 'Customers Last 30 Days', 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( constructor(

View file

@ -83,8 +83,8 @@ export class GraphWidget implements OnInit {
} }
private setData(data: any) { private setData(data: any) {
this.setChartData(data.count); this.setChartData(data.data);
this.setChartLabels(data.day); this.setChartLabels(data.labels);
} }
private setChartData(data: Array<number>) { private setChartData(data: Array<number>) {