use alloc::string::String;
use alloc::vec::Vec;
pub struct DashboardData {
pub title: String,
pub data: Vec<f32>,
}
impl DashboardData {
pub fn new(title: String) -> Self {
Self {
title,
data: Vec::new(),
}
}
}
pub struct HeatmapData {
pub width: u32,
pub height: u32,
pub values: Vec<f32>,
}
impl HeatmapData {
pub fn new(width: u32, height: u32) -> Self {
let size = (width * height) as usize;
Self {
width,
height,
values: vec![0.0; size],
}
}
}
impl Default for DashboardData {
fn default() -> Self {
Self::new("Default Dashboard".into())
}
}
impl Default for HeatmapData {
fn default() -> Self {
Self::new(32, 32)
}
}