-
- | {{element.weight}} |
+
+
+ {{element.weight}}
+ |
{{tableHeader[1].name}} |
- {{element.ranges[0].value}} |
+ {{element.ranges[0].value}} |
{{tableHeader[2].name}} |
- {{element.ranges[1].value}} |
+ {{element.ranges[1].value}} |
{{tableHeader[3].name}} |
- {{element.ranges[2].value}} |
+ {{element.ranges[2].value}} |
{{tableHeader[4].name}} |
- {{element.ranges[3].value}} |
+ {{element.ranges[3].value}} |
{{tableHeader[5].name}} |
- {{element.ranges[4].value}} |
+ {{element.ranges[4].value}} |
{{tableHeader[6].name}} |
- {{element.ranges[5].value}} |
+ {{element.ranges[5].value}} |
{{tableHeader[7].name}} |
- {{element.ranges[6].value}} |
+ {{element.ranges[6].value}} |
{{tableHeader[8].name}} |
- {{element.ranges[7].value}} |
+ {{element.ranges[7].value}} |
{{tableHeader[9].name}} |
- {{element.ranges[8].value}} |
+ {{element.ranges[8].value}} |
-
+
diff --git a/src/app/components/calculator/calculator.component.scss b/src/app/components/calculator/calculator.component.scss
index db84270..baf40ae 100644
--- a/src/app/components/calculator/calculator.component.scss
+++ b/src/app/components/calculator/calculator.component.scss
@@ -38,4 +38,9 @@
appearance: textfield;
-moz-appearance: textfield;
}
+ th {
+ &.first {
+ width: 180px;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/app/components/calculator/calculator.component.ts b/src/app/components/calculator/calculator.component.ts
index 00eabfe..d7d0cd0 100644
--- a/src/app/components/calculator/calculator.component.ts
+++ b/src/app/components/calculator/calculator.component.ts
@@ -1,5 +1,7 @@
import { Component, Input, OnInit, OnDestroy, ViewChild } from '@angular/core';
+import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
+import { RouterLink, RouterModule } from '@angular/router';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider';
@@ -10,70 +12,238 @@ import { MatMenuModule } from '@angular/material/menu';
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
import { MatSort, MatSortModule } from '@angular/material/sort';
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
+import { NgChartsModule } from 'ng2-charts';
+import { Observable, Subscription } from 'rxjs';
-import { CalcResult, InputParams, Range, WeightSize, weightSizes } from 'src/app/core/models';
+import { MenuItems } from 'src/app/components/shared';
+import { CalculatorInfo, CalculatorResult, InputParams, Jump, LineConfig, Range, TableHeader, User, WeightSize, weightSizes } from 'src/app/core/models';
+import { JumpsService, UserService, UtilitiesService } from 'src/app/core/services';
@Component({
standalone: true,
imports: [
- FormsModule,
+ CommonModule, FormsModule, RouterModule,
MatButtonModule, MatCardModule, MatDividerModule,
MatFormFieldModule, MatInputModule, MatIconModule, MatMenuModule,
- MatPaginatorModule, MatSortModule, MatTableModule
+ MatPaginatorModule, MatSortModule, MatTableModule,
+ NgChartsModule
],
selector: 'huapp-calculator',
styleUrls: ['./calculator.component.scss'],
templateUrl: './calculator.component.html'
})
export class CalculatorComponent implements OnInit, OnDestroy {
- title = 'Calcul de taille de voile';
- subtitle = 'DT48 - 13 mars 2020';
- displayedColumns: string[] = [
- "weight",
- "range_1", "range_2", "range_3",
- "range_4", "range_5", "range_6",
- "range_7", "range_8", "range_9"
- ];
- tableHeader: {name: string, active: string}[] = [
- {name: "Poids nu", active: ''},
- {name: "0 à 99", active: ''},
- {name: "100 à 249", active: ''},
- {name: "250 à 399", active: ''},
- {name: "400 à 599", active: ''},
- {name: "600 à 799", active: ''},
- {name: "800 à 999", active: ''},
- {name: "1000 à 1399", active: ''},
- {name: "1400 à 1799", active: ''},
- {name: "1800 à 2000", active: ''},
- ];;
+ private _lastjump: Subscription = new Subscription();
+ private _currentUser: Subscription = new Subscription();
+ public title = 'Calcul de taille de voile';
+ public subtitle = 'DT48 - 13 mars 2020';
+ public lastjump: Jump = {} as Jump;
+ public currentUser: User = {} as User;
+ public displayedColumns: string[] = ['weight'];
+ public tableHeader: TableHeader[] = [{name: 'Poids nu en kg', active: ''}];
+ public sizesHeader: TableHeader[] = [];
+ public sizesValues: number[] = [];
+ public sizesMinValues: number[] = [];
+ public sizesCharges: number[] = [];
+ public sizesValuesM: number[] = [];
+ public displayCharts = false;
+ public chartConfig: LineConfig = this._utilitiesService.getLineChartConfig();
+ public info: CalculatorInfo = {
+ charges: {
+ current: 0,
+ min: 0,
+ min11: 0
+ },
+ sizesFeet: {
+ current: 0,
+ min: 0,
+ min11: 0
+ },
+ sizesMeter: {
+ current: 0,
+ min: 0,
+ min11: 0
+ },
+ state: {
+ color: 'danger'
+ }
+ }
+ public coeffKgLbs: number = this._utilitiesService.getCoeffKgLbs();
+ public coeffFtM: number = this._utilitiesService.getCoeffFtM();
@Input() canopy_size_table!: MatTableDataSource
;
@Input() inputs: InputParams = {
jumps: 0,
weight: 60,
gear: 10,
- current: 175
+ current: 190
} as InputParams;
@ViewChild(MatSort) sort!: MatSort;
@ViewChild(MatPaginator) paginator!: MatPaginator;
- constructor() { }
+ constructor(
+ private jumpsService: JumpsService,
+ private userService: UserService,
+ private _utilitiesService: UtilitiesService,
+ public menuItems: MenuItems
+ ) { }
ngOnInit() {
- return this.loadData();
+ const currentUser$: Observable = this.userService.currentUser;
+ const lastjump$: Observable = this.jumpsService.getLastJump();
+ this._currentUser = currentUser$.subscribe((userData: User) => {
+ this.currentUser = userData;
+ weightSizes[0].ranges.forEach((range: Range) => {
+ let header: TableHeader = {name: range.label, active: range.active};
+ this.tableHeader.push(header)
+ this.sizesHeader.push(header);
+ this.displayedColumns.push(range.name);
+ });
+ this._lastjump = lastjump$.subscribe((jump) => {
+ this.lastjump = jump;
+ this.inputs.jumps = jump.numero;
+ this.inputs.weight = this.currentUser.poids!;
+ this.inputs.current = jump.taille!;
+ this.canopy_size_table = new MatTableDataSource(weightSizes);
+ this.refresh();
+ });
+ });
}
ngOnDestroy() {
- //this._scavenger.unsubscribe();
+ this._currentUser.unsubscribe();
+ this._lastjump.unsubscribe();
}
- loadData():void {
- this.refreshActive();
- this.canopy_size_table = new MatTableDataSource(weightSizes);
+ private _canopySizeCalc(weight: number, jumps: number): CalculatorResult {
+ let result: CalculatorResult = {
+ min: 0,
+ min11: 0
+ };
+ if (jumps > 2000) {
+ this.info.error = '2000Jumps';
+ return result;
+ }
+ let index: number = (this._getTableLine(weight) - this._getTableLine(0));
+ result.min = weightSizes[index].ranges[this._getTableColumn(jumps)].value;
+ result.min11 = this._reduceLimit(result.min, 11);
+
+ return result;
}
- refreshActive():void {
+ private _getCanopyMinSize(weight: number, jumps: number, reduce: number = 0): number {
+ var result: CalculatorResult = this._canopySizeCalc(weight, jumps);
+ let size: number = 0;
+ switch (reduce) {
+ case 11:
+ size = result.min11;
+ break;
+ case 0:
+ default:
+ size = result.min;
+ break;
+ }
+ return size;
+ }
+
+ private _getCanopySizes(weight: number, eleven = false): number[] {
+ var data: number[] = [];
+ if (weight < 60) {
+ weight = 60;
+ }
+ if (weight > 110) {
+ weight = 110;
+ }
+ if (weight >= 60 && weight <= 110) {
+ const line = (weight - this._getTableLine(0));
+ let data = weightSizes[line];
+ if (eleven) {
+ return data.ranges.map((range: Range) => {
+ return Math.ceil(range.value * (100 - 11) / 100);
+ });
+ } else {
+ return data.ranges.map((range: Range) => {
+ return range.value;
+ });
+ }
+ }
+ return data;
+ }
+
+ private _getCharge(canopySize: number, nakedWeight: number, equipementWeight: number): number {
+ return (((nakedWeight + equipementWeight) * this.coeffKgLbs) / canopySize);
+ }
+
+ private _getRangeNum(): number {
+ let data: Range[] = weightSizes[0].ranges;
+ let num: number = 1;
+ data.some((range: Range) => {
+ if (range.start <= this.inputs.jumps && range.end >= this.inputs.jumps) {
+ num = range.num;
+ return true;
+ }
+ return false;
+ });
+ return num;
+ }
+
+ private _getTableColumn(jumps: number): number {
+ let column = 0;
+ if (jumps < 100) {
+ column = 0;
+ } else if (jumps < 250) {
+ column = 1;
+ } else if (jumps < 400) {
+ column = 2;
+ } else if (jumps < 600) {
+ column = 3;
+ } else if (jumps < 800) {
+ column = 4;
+ } else if (jumps < 1000) {
+ column = 5;
+ } else if (jumps < 1400) {
+ column = 6;
+ } else if (jumps < 1800) {
+ column = 7;
+ } else {
+ column = 8;
+ }
+ return column;
+ }
+
+ private _getTableLine(weight: number): number {
+ let line;
+ let min = 60;
+ let max = 110;
+ if (weight < min) {
+ line = min;
+ } else if (weight > max) {
+ line = max;
+ } else {
+ line = weight;
+ }
+ return line;
+ }
+
+ private _convertFeet2Meters(size: number): number {
+ return (size * this._utilitiesService.getCoeffFtM());
+ }
+
+ private _isInRange(nb: number, range: Range): boolean {
+ return (nb >= range.start && nb < range.end);
+ }
+
+ private _reduceLimit(surface: number, percentOff: number) {
+ return Math.ceil(surface * (100 - percentOff) / 100);
+ }
+
+ public refresh():void {
+ this._refreshActive();
+ this._refreshSizes();
+ }
+
+ private _refreshActive(): void {
weightSizes.forEach(element => {
element.active = '';
element.ranges.forEach(range => {
@@ -87,25 +257,80 @@ export class CalculatorComponent implements OnInit, OnDestroy {
weightSizes[(this.inputs.weight - 60)].active = 'active';
}
if (this.inputs.jumps >= 0) {
- var num = this.getRangeNum();
+ var num = this._getRangeNum();
this.tableHeader[num].active = 'active';
weightSizes.forEach(element => {
element.ranges[(num-1)].active = 'active';
});
}
}
-
- private getRangeNum(): number {
- var data: Range[] = weightSizes[0].ranges;
- var num: number = 1;
- data.some((range: Range) => {
- if (range.start <= this.inputs.jumps && range.end >= this.inputs.jumps) {
- num = range.num;
- return true;
- }
- return false;
+
+ private _getStateColor(current: number, min: number, min11: number): string {
+ let color: string = 'danger';
+ if (current >= min11 && current < min) {
+ color = 'warning';
+ }
+ if (current >= min) {
+ color = 'success';
+ }
+
+ return color;
+ }
+ private _refreshSizes(): void {
+ this.sizesValues = this._getCanopySizes(this.inputs.weight, false);
+ this.sizesMinValues = this._getCanopySizes(this.inputs.weight, true);
+ this.sizesValues.forEach((value: number, index: number) => {
+ this.sizesCharges[index] = this._getCharge(value, this.inputs.weight, this.inputs.gear);
+ this.sizesValuesM[index] = this._convertFeet2Meters(value);
});
- return num;
+ this.info.sizesFeet = this._canopySizeCalc(this.inputs.weight, this.inputs.jumps);
+ this.info.sizesFeet.current = this.inputs.current;
+ this.info.sizesMeter = {
+ current: this._convertFeet2Meters(this.inputs.current),
+ min: this._convertFeet2Meters(this.info.sizesFeet.min),
+ min11: this._convertFeet2Meters(this.info.sizesFeet.min11)
+ }
+ this.info.charges = {
+ current: this._getCharge(this.inputs.current, this.inputs.weight, this.inputs.gear),
+ min: this._getCharge(this.info.sizesFeet.min, this.inputs.weight, this.inputs.gear),
+ min11: this._getCharge(this.info.sizesFeet.min11, this.inputs.weight, this.inputs.gear)
+ }
+ this.info.state.color = this._getStateColor(this.info.sizesFeet.current, this.info.sizesFeet.min, this.info.sizesFeet.min11);
+
+ this.chartConfig.lineChartData.labels = [...this.sizesHeader.map((
+ data: {
+ name: string;
+ active: string;
+ }
+ ): string => {
+ return data.name;
+ })];
+ this.chartConfig.lineChartData.datasets = [
+ {
+ label: 'Tailles min -11%',
+ data: this.sizesMinValues,
+ fill: true,
+ stepped: true,
+ pointStyle: false,
+ borderColor: 'rgba(241, 80, 80, 1)',
+ backgroundColor: 'rgba(241, 80, 80, 0.3)'
+ },
+ {
+ label: 'Tailles min',
+ data: this.sizesValues,
+ fill: true,
+ stepped: true,
+ pointStyle: false,
+ borderColor: 'rgba(32, 182, 252, 1)',
+ backgroundColor: 'rgba(32, 182, 252, 0.3)'
+ }
+ ];
+ this.displayCharts = true;
+ }
+
+ public setCurrentWeight(weight: number) {
+ this.inputs.weight = weight;
+ this.refresh();
}
}
diff --git a/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.html b/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.html
index 4b47027..3455d79 100755
--- a/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.html
+++ b/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.html
@@ -1,44 +1,46 @@
-
- Aéronefs
- Nombre total de sauts par avions
-
-
-
-
+
+ {{ title }}
+ {{ subtitle }}
+
+
+
+
+
+
-
-
-
- |
- {{name}} |
- Total |
-
-
-
-
- | ● {{seriesName[i]}} |
-
- {{value}}
- {{value}}
- |
-
- {{seriesValue[i]}}
- {{seriesValue[i]}}
- |
-
-
-
-
-
+
+
+
+
+
+ Historique annuel
+
+
+
+
+
diff --git a/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.ts b/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.ts
index 52325ba..ed2d780 100755
--- a/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.ts
+++ b/src/app/components/home/dashboard-components/aeronefs-bar/aeronefs-bar.component.ts
@@ -1,35 +1,48 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { CommonModule } from '@angular/common';
+import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
-import { ChartistModule, Configuration } from 'ng-chartist';
+import { MatExpansionModule } from '@angular/material/expansion';
+import { MatIconModule } from '@angular/material/icon';
+import { MatMenuModule } from '@angular/material/menu';
+import { ChartDataset } from 'chart.js';
+import { NgChartsModule } from 'ng2-charts';
import { Observable, Subscription } from 'rxjs';
-import { BackendService, AeronefsService } from 'src/app/core/services';
-import { chartBar, AeronefByImat, AeronefByYear } from 'src/app/core/models';
+import { MenuItems, HistoryTableComponent } from 'src/app/components/shared';
+import { UtilitiesService, AeronefsService } from 'src/app/core/services';
+import { AeronefByImat, AeronefByYear, BarConfig } from 'src/app/core/models';
@Component({
standalone: true,
- imports: [CommonModule, MatCardModule, ChartistModule],
+ imports: [
+ CommonModule,
+ MatButtonModule, MatCardModule, MatExpansionModule, MatIconModule, MatMenuModule,
+ NgChartsModule,
+ HistoryTableComponent
+ ],
selector: 'huapp-aeronefs-bar',
templateUrl: './aeronefs-bar.component.html'
})
export class AeronefsBarComponent implements OnInit, OnDestroy {
private _aeronefByImat: Subscription = new Subscription();
private _aeronefByYear: Subscription = new Subscription();
- aeronefByImat!: Array;
- aeronefByYear!: Array;
- aeronefByImatCount = 0;
- aeronefByYearCount = 0;
- seriesName: string[] = [];
- seriesValue: any[] = [];
- seriesColor: string[] = this._dataService.getChartColors();
- seriesHeader: string[] = [];
- seriesRow: any[] = [];
- barChartAeronef: Configuration = chartBar;
+ private _aeronefsByImat!: Array;
+ private _aeronefsByYear!: Array;
+ public title: string = 'Aéronefs';
+ public subtitle: string = 'Nombre total de sauts par aéronef';
+ public seriesHeader: string[] = [];
+ public seriesName: string[] = [];
+ public seriesValue: any[] = [];
+ public seriesRow: any[] = [];
+ public seriesColor: string[] = this._utilitiesService.getChartColors();
+ public displayCharts = false;
+ public chartConfig: BarConfig = this._utilitiesService.getHorizontalBarChartConfig();
constructor(
- private aeronefsService: AeronefsService,
- private _dataService: BackendService
+ private _aeronefsService: AeronefsService,
+ private _utilitiesService: UtilitiesService,
+ public menuItems: MenuItems
) { }
ngOnInit() {
@@ -42,102 +55,43 @@ export class AeronefsBarComponent implements OnInit, OnDestroy {
}
private _loadAeronefByImat(): void {
- const aeronefs$: Observable> = this.aeronefsService.getAllByImat();
+ let values: Array = [];
+ const aeronefs$: Observable> = this._aeronefsService.getAllByImat();
this._aeronefByImat = aeronefs$.subscribe((aggregate: Array) => {
- this.aeronefByImat = aggregate;
- this.aeronefByImatCount = aggregate.length;
- this.aeronefByImat.forEach((row) => {
+ this._aeronefsByImat = aggregate.map((row: AeronefByImat) => {
+ //this.chartConfig.barChartData.labels!.push(`${row._id.aeronef} ${row._id.imat}`);
this.seriesName.push(`${row._id.aeronef} ${row._id.imat}`);
this.seriesValue.push(row.count);
+ return row;
});
- this.barChartAeronef = {
- type: 'Bar',
- data: {
- "labels": this.seriesName,
- "series": this.seriesValue
- },
- options: {
- chartPadding: {
- top: 15,
- right: 20,
- bottom: 0,
- left: 20
- },
- seriesBarDistance: 15,
- horizontalBars: true,
- axisX: {
- onlyInteger: true,
- position: 'end',
- labelOffset: {
- x: 0,
- y: 0
- },
- showGrid: true,
- offset: 20
- },
- axisY: {
- showGrid: false,
- offset: 0,
- labelInterpolationFnc: function(): string {
- return '';
- }
- },
- height: (this.seriesName.length*20)
- },
- responsiveOptions: [
- ['screen and (min-width: 1024px)', {
- axisX: {
- labelInterpolationFnc: function(value: number, index: number): string {
- return index % 1 === 0 ? `${value}` : '';
- }
- }
- }],
- ['screen and (min-width: 641px) and (max-width: 1024px)', {
- seriesBarDistance: 10,
- axisY: {
- offset: 30
- },
- axisX: {
- labelInterpolationFnc: function(value: any, index: number): string {
- return index % 1 === 0 ? `${value[2]}${value[3]}` : '';
- }
- }
- }],
- ['screen and (max-width: 640px)', {
- seriesBarDistance: 5,
- axisY: {
- offset: 20
- },
- axisX: {
- labelInterpolationFnc: function(value: any, index: number): string {
- return index % 1 === 0 ? `${value[2]}${value[3]}` : '';
- }
- }
- }]
- ]
+ let data: ChartDataset<'bar'> = {
+ data: [...this.seriesValue],
+ label: 'Nombre total de sauts',
+ backgroundColor: this._utilitiesService.getSeriesColors(0.9),
+ borderColor: 'rgba(255, 255, 255, 1)', //this._utilitiesService.getSeriesColors(1),
+ borderWidth: 0
};
+ this.chartConfig.barChartData.labels = [...this.seriesName];
+ this.chartConfig.barChartData.datasets!.push(data);
+ this.displayCharts = true;
this._loadAeronefByYear();
});
}
private _loadAeronefByYear(): void {
- let values: Array = [];
this.seriesHeader = ["2018", "2019", "2020", "2021", "2022", "2023"];
- this.seriesHeader.forEach(() => {
- values.push(0);
- });
+ let values: Array = this.seriesHeader.map(() => 0);
this.seriesName.forEach(() => {
this.seriesRow.push([...values]);
});
- const dropzones$: Observable> = this.aeronefsService.getAllByDate();
+ const dropzones$: Observable> = this._aeronefsService.getAllByDate();
this._aeronefByYear = dropzones$.subscribe((aggregate: Array) => {
- this.aeronefByYear = aggregate;
- this.aeronefByYearCount = aggregate.length;
- this.aeronefByYear.forEach((row: AeronefByYear) => {
+ this._aeronefsByYear = aggregate.map((row: AeronefByYear) => {
let aeronef: string = row._id.aeronef;
let imat: string = row._id.imat;
let year: string = row._id.year.toString();
this.seriesRow[this.seriesName.indexOf(`${aeronef} ${imat}`)][this.seriesHeader.indexOf(year)] = row.count;
+ return row;
});
});
}
diff --git a/src/app/components/home/dashboard-components/aeronefs/aeronefs.component.html b/src/app/components/home/dashboard-components/aeronefs/aeronefs.component.html
index f707f20..c0e2373 100755
--- a/src/app/components/home/dashboard-components/aeronefs/aeronefs.component.html
+++ b/src/app/components/home/dashboard-components/aeronefs/aeronefs.component.html
@@ -1,36 +1,39 @@
-
- Aéronefs
- Nombre total de sauts par avions
-
-
-
-
+
+ {{ title }}
+ {{ subtitle }}
+
+
+
+
+
+
-
-
-
- |
- {{name}} |
- Total |
-
-
-
-
- | ● {{seriesName[i]}} |
-
- {{value}}
- {{value}}
- |
-
- {{seriesValue[i]}}
- {{seriesValue[i]}}
- |
-
-
-
+
+
+
+
+
+
+
+ Historique annuel
+
+
+
+
+
+
+
+
+
+
+
+ Historique annuel
+
+
+
+
+
diff --git a/src/app/components/home/dashboard-components/canopy-sizes/canopy-sizes.component.ts b/src/app/components/home/dashboard-components/canopy-sizes/canopy-sizes.component.ts
index 0e7d1ad..cda6119 100755
--- a/src/app/components/home/dashboard-components/canopy-sizes/canopy-sizes.component.ts
+++ b/src/app/components/home/dashboard-components/canopy-sizes/canopy-sizes.component.ts
@@ -1,37 +1,48 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { CommonModule } from '@angular/common';
+import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
-import { ChartistModule, Configuration } from 'ng-chartist';
+import { MatExpansionModule } from '@angular/material/expansion';
+import { MatIconModule } from '@angular/material/icon';
+import { MatMenuModule } from '@angular/material/menu';
+import { NgChartsModule } from 'ng2-charts';
import { Observable, Subscription } from 'rxjs';
-import { BackendService, CanopiesService } from 'src/app/core/services';
-import { chartPieDonute, CanopyBySize, CanopyByYear, ReduceRow } from 'src/app/core/models';
+import { MenuItems, HistoryTableComponent } from 'src/app/components/shared';
+import { UtilitiesService, CanopiesService } from 'src/app/core/services';
+import { CanopyBySize, CanopyByYear, DoughnutConfig } from 'src/app/core/models';
@Component({
standalone: true,
- imports: [CommonModule, MatCardModule, ChartistModule],
+ imports: [
+ CommonModule,
+ MatButtonModule, MatCardModule, MatExpansionModule, MatIconModule, MatMenuModule,
+ NgChartsModule,
+ HistoryTableComponent
+ ],
selector: 'huapp-canopy-sizes',
templateUrl: './canopy-sizes.component.html'
})
export class CanopySizesComponent implements OnInit, OnDestroy {
private _canopyBySize: Subscription = new Subscription();
private _canopyByYear: Subscription = new Subscription();
- canopyBySize!: Array;
- canopyByYear!: Array;
- canopyBySizeCount = 0;
- canopyByYearCount = 0;
- rows: Object[] = [] as Array