diff --git a/src/app/dashboard/dashboard-customer.component.html b/src/app/dashboard/dashboard-customer.component.html index f11d074..ec3e8ad 100644 --- a/src/app/dashboard/dashboard-customer.component.html +++ b/src/app/dashboard/dashboard-customer.component.html @@ -60,27 +60,6 @@ -
-
-
-
-
-

Monthly Spending by Category

-
-
-
- -
-
-
-
@@ -179,44 +158,5 @@
-
-
-
-
-
-

Spend by company and Industrial sector

-
-
-
- -
-
-
    - -
  • - -
    -
    {{ category.category || 'N/A' }}
    -
    -
    -
    Bought
    - {{ category.value || 'N/A' }} -
    -
  • -
  • - -
  • -
-
-
-
-
diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts index bb6f871..94fa180 100644 --- a/src/app/dashboard/dashboard-customer.component.ts +++ b/src/app/dashboard/dashboard-customer.component.ts @@ -116,81 +116,6 @@ export class DashboardCustomerComponent implements OnInit { totalCategoryLimit: number = 10; totalCategoryList: any[]=[]; - public lineChartData: ChartDataSets[] = [ - { data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A' }, - { data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B' }, - { data: [180, 480, 770, 90, 1000, 270, 400], label: 'Series C', yAxisID: 'y-axis-1' } - ]; - public lineChartLabels: Label[] = ['January', 'February', 'March', 'April', 'May', 'June', 'July','August','September','October','November','December']; - public lineChartOptions: (ChartOptions & { annotation: any }) = { - responsive: true, - scales: { - // We use this empty structure as a placeholder for dynamic theming. - xAxes: [{}], - yAxes: [ - { - id: 'y-axis-0', - position: 'left', - }, - { - id: 'y-axis-1', - position: 'right', - gridLines: { - color: 'rgba(255,0,0,0.3)', - }, - ticks: { - fontColor: 'red', - } - } - ] - }, - annotation: { - annotations: [ - { - type: 'line', - mode: 'vertical', - scaleID: 'x-axis-0', - value: 'March', - borderColor: 'orange', - borderWidth: 2, - label: { - enabled: true, - fontColor: 'orange', - content: 'LineAnno' - } - }, - ], - }, - }; - public lineChartColors: Color[] = [ - { // grey - backgroundColor: 'rgba(148,159,177,0.2)', - borderColor: 'rgba(148,159,177,1)', - pointBackgroundColor: 'rgba(148,159,177,1)', - pointBorderColor: '#fff', - pointHoverBackgroundColor: '#fff', - pointHoverBorderColor: 'rgba(148,159,177,0.8)' - }, - { // dark grey - backgroundColor: 'rgba(77,83,96,0.2)', - borderColor: 'rgba(77,83,96,1)', - pointBackgroundColor: 'rgba(77,83,96,1)', - pointBorderColor: '#fff', - pointHoverBackgroundColor: '#fff', - pointHoverBorderColor: 'rgba(77,83,96,1)' - }, - { // red - backgroundColor: 'rgba(255,0,0,0.3)', - borderColor: 'red', - pointBackgroundColor: 'rgba(148,159,177,1)', - pointBorderColor: '#fff', - pointHoverBackgroundColor: '#fff', - pointHoverBorderColor: 'rgba(148,159,177,0.8)' - } - ]; - public lineChartLegend = true; - public lineChartType = 'line'; - // Graph widgets public widgetList = [ diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 1973efa..8ecad53 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -44,6 +44,13 @@ export class DashboardComponent { title: 'Sales Last 30 Days', dataType: DataType.currency, }, + { + type: 'graph', + name: 'sales_last_365_days', + icon: 'icon-diamond', + title: 'Sales Last Year', + dataType: DataType.currency, + }, { type: 'graph', name: 'purchases_last_7_days', @@ -56,6 +63,12 @@ export class DashboardComponent { title: 'Purchases Last 30 Days', dataType: DataType.currency, }, + { + type: 'graph', + name: 'purchases_last_365_days;', + title: 'Purchases Last Year', + dataType: DataType.currency, + }, ]; disableCategoryButton: boolean = false; diff --git a/src/app/dashboard/dashboard.routing.ts b/src/app/dashboard/dashboard.routing.ts index 6fba7de..6d554ef 100644 --- a/src/app/dashboard/dashboard.routing.ts +++ b/src/app/dashboard/dashboard.routing.ts @@ -95,7 +95,7 @@ const routes: Routes = [ { path: 'more-graphs-and-tables', component: MoreStuffComponent, - data: { title: 'More Stuff'} + data: { title: 'Infographics'} } ], } diff --git a/src/app/dashboard/more-graphs-and-tables.component.html b/src/app/dashboard/more-graphs-and-tables.component.html index 135d1ab..d4e5e2d 100644 --- a/src/app/dashboard/more-graphs-and-tables.component.html +++ b/src/app/dashboard/more-graphs-and-tables.component.html @@ -10,7 +10,6 @@ @@ -22,14 +21,13 @@
-

Last 12 months

+

Spend amount and number of organisations

@@ -40,15 +38,23 @@
-
+

Supplier Spend History

+
+ +
diff --git a/src/app/dashboard/more-graphs-and-tables.component.ts b/src/app/dashboard/more-graphs-and-tables.component.ts index a6ca7ab..92c0c30 100644 --- a/src/app/dashboard/more-graphs-and-tables.component.ts +++ b/src/app/dashboard/more-graphs-and-tables.component.ts @@ -72,10 +72,9 @@ export class MoreStuffComponent implements OnInit { { data: [], label: ["Spend"], - backgroundColor: 'green', borderColor: 'blue', - hoverBackgroundColor: 'purple', - hoverBorderColor: 'red', + hoverBackgroundColor: 'blue', + hoverBorderColor: 'blue', }, ]; public supplierBubbleChartLabels: string[] = []; @@ -137,8 +136,8 @@ export class MoreStuffComponent implements OnInit { label: ["Value"], fill: false, borderColor: 'red', + hoverBackgroundColor: '#ffa1b5', hoverBorderColor: 'red', - hoverBackgroundColor: 'red', yAxisID: 'y-value', }, { @@ -146,7 +145,7 @@ export class MoreStuffComponent implements OnInit { label: ["Count"], fill: false, borderColor: 'blue', - hoverBackgroundColor: 'blue', + hoverBackgroundColor: '#52afed', hoverBorderColor: 'blue', yAxisID: 'y-count', }, @@ -169,16 +168,8 @@ export class MoreStuffComponent implements OnInit { public yearSpendChartColors: Color[] = [ { backgroundColor: [ - 'red', - 'green', - 'blue', - 'purple', - 'yellow', - 'brown', - 'magenta', - 'cyan', - 'orange', - 'pink' + '#ffa1b5', + '#52afed' ] } ]; @@ -204,14 +195,19 @@ export class MoreStuffComponent implements OnInit { half.push(item.half_total); quarter.push(item.quarter_total); }); - this.supplierMonthChartData[0].data = quarter.slice(0,10); - this.supplierMonthChartData[1].data = half.slice(0,10); - this.supplierMonthChartData[2].data = year.slice(0,10); - this.supplierMonthChartLabels = labels.slice(0,10); + this.supplierMonthChartData[0].data = quarter.slice(0,15); + this.supplierMonthChartData[1].data = half.slice(0,15); + this.supplierMonthChartData[2].data = year.slice(0,15); + this.supplierMonthChartLabels = labels.slice(0,15); } ) } - + public newGroup() { + this.supplierMonthChartData[0].data = quarter.slice(0,15); + this.supplierMonthChartData[1].data = half.slice(0,15); + this.supplierMonthChartData[2].data = year.slice(0,15); + this.supplierMonthChartLabels = labels.slice(0,15); + } public supplierMonthChartData: any[] = [ { data: [], @@ -225,17 +221,17 @@ export class MoreStuffComponent implements OnInit { data: [], label: ["6 Month"], fill: false, - borderColor: 'red', - hoverBorderColor: 'red', - hoverBackgroundColor: 'red', + borderColor: 'blue', + hoverBorderColor: 'blue', + hoverBackgroundColor: 'blue', }, { data: [], label: ["12 Month"], fill: false, - borderColor: 'red', - hoverBorderColor: 'red', - hoverBackgroundColor: 'red', + borderColor: 'orange', + hoverBorderColor: 'orange', + hoverBackgroundColor: 'orange', }, ]; public supplierMonthChartOptions: any = { diff --git a/src/app/layouts/full-layout.component.html b/src/app/layouts/full-layout.component.html index 26a4ed9..31e297a 100644 --- a/src/app/layouts/full-layout.component.html +++ b/src/app/layouts/full-layout.component.html @@ -38,6 +38,14 @@
+ -