dev smartfarming #1

Merged
agrilink merged 53 commits from development into main 2024-12-30 05:53:19 +00:00
Showing only changes of commit 7c44188d6e - Show all commits

View File

@ -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'){