fetches correct date ranges

This commit is contained in:
Felix 2019-08-14 16:06:09 +01:00
parent efb5888b43
commit dfdc3a8816

View file

@ -51,11 +51,11 @@ export class MoreStuffComponent implements OnInit {
* Supplier Bubble Chart Setup * Supplier Bubble Chart Setup
*/ */
private loadSupplierBubble(bool useRange, Date start_range, Date end_range) { private loadSupplierBubble(useRange: Bool, start_range : Date, end_range : Date) {
this.api.loadMiscUrl('organisation/external/supplier_count').subscribe( this.api.loadMiscUrl('organisation/external/supplier_count').subscribe(
result => { result => {
if (useRange) { if (useRange == true) {
let ranged_data = []; let ranged_data = [];
for (var i = 0; i < ranged_data.data.count; i++) { for (var i = 0; i < ranged_data.data.count; i++) {
@ -70,7 +70,7 @@ export class MoreStuffComponent implements OnInit {
count: item.count, count: item.count,
}); });
} }
} });
} }
this.supplierBubbleChartData[0].data = ranged_data; this.supplierBubbleChartData[0].data = ranged_data;
@ -171,7 +171,8 @@ export class MoreStuffComponent implements OnInit {
} }
bubbleChartUpdate() { bubbleChartUpdate() {
// this is called when daterange is changed
console.log("yeeeee");
} }
public yearSpendChartData: any[] = [ public yearSpendChartData: any[] = [