mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
made charts based on states and not based on metrics.
This commit is contained in:
@ -4,28 +4,28 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
||||
class AirQualityDataModel {
|
||||
const AirQualityDataModel({
|
||||
required this.date,
|
||||
this.aqi,
|
||||
this.pm25,
|
||||
this.pm10,
|
||||
this.hcho,
|
||||
this.tvoc,
|
||||
this.co2,
|
||||
this.good,
|
||||
this.moderate,
|
||||
this.poor,
|
||||
this.unhealthy,
|
||||
this.severe,
|
||||
this.hazardous,
|
||||
});
|
||||
|
||||
final DateTime date;
|
||||
final double? aqi;
|
||||
final double? pm25;
|
||||
final double? pm10;
|
||||
final double? hcho;
|
||||
final double? tvoc;
|
||||
final double? co2;
|
||||
final double? good;
|
||||
final double? moderate;
|
||||
final double? poor;
|
||||
final double? unhealthy;
|
||||
final double? severe;
|
||||
final double? hazardous;
|
||||
|
||||
static final Map<String, Color> metricColors = {
|
||||
'aqi': ColorsManager.goodGreen.withValues(alpha: 0.7),
|
||||
'pm25': ColorsManager.moderateYellow.withValues(alpha: 0.7),
|
||||
'pm10': ColorsManager.poorOrange.withValues(alpha: 0.7),
|
||||
'hcho': ColorsManager.unhealthyRed.withValues(alpha: 0.7),
|
||||
'tvoc': ColorsManager.severePink.withValues(alpha: 0.7),
|
||||
'co2': ColorsManager.hazardousPurple.withValues(alpha: 0.7),
|
||||
'good': ColorsManager.goodGreen.withValues(alpha: 0.7),
|
||||
'moderate': ColorsManager.moderateYellow.withValues(alpha: 0.7),
|
||||
'poor': ColorsManager.poorOrange.withValues(alpha: 0.7),
|
||||
'unhealthy': ColorsManager.unhealthyRed.withValues(alpha: 0.7),
|
||||
'severe': ColorsManager.severePink.withValues(alpha: 0.7),
|
||||
'hazardous': ColorsManager.hazardousPurple.withValues(alpha: 0.7),
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user