diff --git a/agrilink_vocpro/src/app/pages/dashboard/page/graph/graph.component.ts b/agrilink_vocpro/src/app/pages/dashboard/page/graph/graph.component.ts index 2b03688..9d29608 100644 --- a/agrilink_vocpro/src/app/pages/dashboard/page/graph/graph.component.ts +++ b/agrilink_vocpro/src/app/pages/dashboard/page/graph/graph.component.ts @@ -301,6 +301,7 @@ export class GraphComponent implements OnInit, AfterViewInit, OnDestroy, OnChang if (this.charts['dht']) { this.filterData(this.activeButton); + console.log(this.activeButton); } } @@ -455,7 +456,7 @@ export class GraphComponent implements OnInit, AfterViewInit, OnDestroy, OnChang grid: { display: false }, beginAtZero: true, ticks: { - callback: (value: number | string) => { + callback: (value: string | number, index: number, values: any) => { if (this.activeButton === 'vicitemperature') { return `${value} °C`; } else if (this.activeButton === 'vicihumidity') { @@ -513,7 +514,7 @@ export class GraphComponent implements OnInit, AfterViewInit, OnDestroy, OnChang grid: { display: false }, beginAtZero: true, ticks:{ - callback: (value: number | string) => { + callback: (value: string | number, index: number, values: any) => { if(selectedOption === 'npk'){ return `${value} mg/L`; } else if(selectedOption === 'temperature'){