diff --git a/src/app/dashboard/dashboard-customer.component.ts b/src/app/dashboard/dashboard-customer.component.ts
index a17bf0c..358cc0a 100644
--- a/src/app/dashboard/dashboard-customer.component.ts
+++ b/src/app/dashboard/dashboard-customer.component.ts
@@ -35,10 +35,25 @@ export class DashboardCustomerComponent implements OnInit {
public bootstrapColours: string[] = ['bg-primary', 'bg-secondary', 'bg-success',
'bg-danger', 'bg-warning', 'bg-info'];
- public chartType = 'bar';
+ public chartType = 'doughnut';
public chartLegend = true;
public doughnutChartDataCategory: any[] = [];
public doughnutChartLabelsCategory: string[] = [];
+ public doughnutChartColoursCategory: any[] = [
+ {
+ backgroundColor:[
+ 'red',
+ 'green',
+ 'blue',
+ 'purple',
+ 'yellow',
+ 'brown',
+ 'magenta',
+ 'cyan',
+ 'orange',
+ 'pink'
+ ]
+ }];
public doughnutChartOptionsCategory:any = {
tooltips: {
diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html
index 8520235..1169a33 100644
--- a/src/app/dashboard/dashboard.component.html
+++ b/src/app/dashboard/dashboard.component.html
@@ -60,7 +60,7 @@
-
Spending by Category
+ Last week's spending by Category
diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts
index ddd479b..099c65a 100644
--- a/src/app/dashboard/dashboard.component.ts
+++ b/src/app/dashboard/dashboard.component.ts
@@ -46,9 +46,9 @@ export class DashboardComponent {
},
{
type: 'graph',
- name: 'sales_last_year',
+ name: 'sales_last_quart',
icon: 'icon-diamond',
- title: 'Sales Last Year',
+ title: 'Sales Last Quart',
dataType: DataType.currency,
},
{
@@ -65,8 +65,8 @@ export class DashboardComponent {
},
{
type: 'graph',
- name: 'purchases_last_year;',
- title: 'Purchases Last Year',
+ name: 'purchases_last_quart;',
+ title: 'Purchases Last Quart',
dataType: DataType.currency,
},
];
diff --git a/src/app/dashboard/more-graphs-and-tables.component.html b/src/app/dashboard/more-graphs-and-tables.component.html
index cf3adcc..300926c 100644
--- a/src/app/dashboard/more-graphs-and-tables.component.html
+++ b/src/app/dashboard/more-graphs-and-tables.component.html
@@ -5,12 +5,12 @@
Supplier spend amount and number of purchases
-
-
+
@@ -30,10 +30,6 @@
Spend amount and number of organisations
-
-
-
-
-
\ No newline at end of file
+
diff --git a/src/app/dashboard/more-graphs-and-tables.component.ts b/src/app/dashboard/more-graphs-and-tables.component.ts
index 9f8ce6c..a346283 100644
--- a/src/app/dashboard/more-graphs-and-tables.component.ts
+++ b/src/app/dashboard/more-graphs-and-tables.component.ts
@@ -41,7 +41,7 @@ export class MoreStuffComponent implements OnInit {
backgroundColor: [
'red',
'green',
- 'blue',
+ '#52afed',
'purple',
'yellow',
'brown',
@@ -66,7 +66,7 @@ export class MoreStuffComponent implements OnInit {
passed_graph_data.data.map(item=> {
let is_item_in_range = (new Date(item.date.substring(0, 10)) >= new Date(start_range) && new Date(item.date.substring(0, 10)) <= new Date(end_range));
// there are a lot of `new Date(blah)` but that is what works for some reason.
-
+
// console.log("item.date : " + (item.date));
// console.log("Date(item.date) : " + new Date(item.date));
// console.log("Date(item.date.substring(0, 10)) : " + new Date(item.date.substring(0, 10)));
@@ -78,11 +78,11 @@ export class MoreStuffComponent implements OnInit {
// console.log("item.date <= end_range: " + (new Date(item.date) <= new Date(end_range)));
// console.log("is_item_in_range: " + is_item_in_range);
// console.log("----------------------");
-
+
if (is_item_in_range) {
graph_data.push({
t: new Date(item.date.substring(0, 10)),
- r: item.value > 1000000 ? (item.value / 1000000) + 10 : (item.value / 100000) + 5,
+ r: item.value > 1000000 ? (item.value / 100000) : (item.value / 100000) + 5,
supplier: item.seller,
y: item.count,
value: item.value,
@@ -96,7 +96,7 @@ export class MoreStuffComponent implements OnInit {
passed_graph_data.data.map(item => {
graph_data.push({
t: item.date,
- r: item.value > 1000000 ? (item.value / 1000000) + 10 : (item.value / 100000) + 5,
+ r: item.value > 1000000 ? (item.value / 200000) : (item.value / 100000) + 5,
supplier: item.seller,
y: item.count,
value: item.value,
diff --git a/src/app/panels/org-pie-panel.component.ts b/src/app/panels/org-pie-panel.component.ts
index 84feb57..ad2807d 100644
--- a/src/app/panels/org-pie-panel.component.ts
+++ b/src/app/panels/org-pie-panel.component.ts
@@ -18,30 +18,30 @@ export class OrgPiePanel implements OnInit {
public doughnutChartColors: any[] = [
{
backgroundColor: [
- 'red',
+ '#ffa1b5',
'green',
- 'pink',
+ '#52afed',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
- 'blue'
+ 'pink'
]
},
{
borderColor: [
'red',
'green',
- 'pink',
+ 'blue',
'purple',
'yellow',
'brown',
'magenta',
'cyan',
'orange',
- 'blue'
+ 'pink'
]
},
{ borderWidth: [100]
diff --git a/src/app/panels/pie-panel.component.html b/src/app/panels/pie-panel.component.html
index 1a900f4..0a3846d 100644
--- a/src/app/panels/pie-panel.component.html
+++ b/src/app/panels/pie-panel.component.html
@@ -1,22 +1,9 @@
-
+
All Purchases by Category
-