// Infrastructure monitoring dashboard
final healthColors = {
'Healthy': const Color(0xFF10B981), // Green - all good
'Warning': const Color(0xFFF59E0B), // Amber - attention needed
'Critical': const Color(0xFFEF4444), // Red - urgent
'Maintenance': const Color(0xFF6B7280), // Gray - planned downtime
};
final serverData = [
{'hour': '00:00', 'count': 12, 'status': 'Healthy'},
{'hour': '06:00', 'count': 15, 'status': 'Healthy'},
{'hour': '12:00', 'count': 8, 'status': 'Healthy'},
{'hour': '00:00', 'count': 2, 'status': 'Warning'},
{'hour': '06:00', 'count': 3, 'status': 'Warning'},
{'hour': '12:00', 'count': 1, 'status': 'Warning'},
{'hour': '00:00', 'count': 0, 'status': 'Critical'},
{'hour': '06:00', 'count': 1, 'status': 'Critical'},
{'hour': '12:00', 'count': 2, 'status': 'Critical'},
];
CristalyseChart()
.data(serverData)
.mapping(x: 'hour', y: 'count', color: 'status')
.geomArea(strokeWidth: 1.5, alpha: 0.6)
.customPalette(categoryColors: healthColors)
.scaleXOrdinal()
.scaleYContinuous(min: 0)
.theme(ChartTheme.darkTheme())
.build()