fetches correct date ranges
This commit is contained in:
parent
263d3d15ab
commit
00889b2104
1 changed files with 6 additions and 5 deletions
|
@ -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[] = [
|
||||||
|
|
Reference in a new issue