fix(graph): fix pulign ticks satuan
This commit is contained in:
parent
a5fbb018c4
commit
7c44188d6e
|
|
@ -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'){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user