fetches correct date ranges
This commit is contained in:
parent
efb5888b43
commit
dfdc3a8816
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++) {
|
||||||
|
@ -68,9 +68,9 @@ export class MoreStuffComponent implements OnInit {
|
||||||
y: item.count,
|
y: item.count,
|
||||||
value: item.value,
|
value: item.value,
|
||||||
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