optimization
Some checks failed
Deploy MyApp on Same Server / build-and-deploy (push) Failing after 1s
Some checks failed
Deploy MyApp on Same Server / build-and-deploy (push) Failing after 1s
This commit is contained in:
54
src/features/daily-report/chart-config.ts
Normal file
54
src/features/daily-report/chart-config.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import { ChartConfig } from './types'
|
||||
import { NormalizedTelemetry } from './types'
|
||||
|
||||
export const BASE_CHART_CONFIGS: ChartConfig[] = [
|
||||
{
|
||||
key: 'soil',
|
||||
title: 'رطوبت خاک',
|
||||
seriesLabel: 'رطوبت خاک (%)',
|
||||
color: '#16a34a',
|
||||
bgColor: '#dcfce7',
|
||||
getValue: (t: NormalizedTelemetry) => t.soil,
|
||||
yAxisMin: 0,
|
||||
yAxisMax: 100,
|
||||
},
|
||||
{
|
||||
key: 'hum',
|
||||
title: 'رطوبت',
|
||||
seriesLabel: 'رطوبت (%)',
|
||||
color: '#3b82f6',
|
||||
bgColor: '#dbeafe',
|
||||
getValue: (t: NormalizedTelemetry) => t.hum,
|
||||
yAxisMin: 0,
|
||||
yAxisMax: 100,
|
||||
},
|
||||
{
|
||||
key: 'temp',
|
||||
title: 'دما',
|
||||
seriesLabel: 'دما (°C)',
|
||||
color: '#ef4444',
|
||||
bgColor: '#fee2e2',
|
||||
getValue: (t: NormalizedTelemetry) => t.temp,
|
||||
yAxisMin: 0,
|
||||
},
|
||||
{
|
||||
key: 'lux',
|
||||
title: 'نور',
|
||||
seriesLabel: 'Lux',
|
||||
color: '#a855f7',
|
||||
bgColor: '#f3e8ff',
|
||||
getValue: (t: NormalizedTelemetry) => t.lux,
|
||||
yAxisMin: 0,
|
||||
},
|
||||
{
|
||||
key: 'gas',
|
||||
title: 'گاز CO',
|
||||
seriesLabel: 'CO (ppm)',
|
||||
color: '#f59e0b',
|
||||
bgColor: '#fef3c7',
|
||||
getValue: (t: NormalizedTelemetry) => t.gas,
|
||||
yAxisMin: 0,
|
||||
yAxisMax: 100,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user