#[derive(Default)]
pub struct Labels<'a> {
pub color: Option<iced::Color>,
pub font_size: Option<iced::Pixels>,
pub format: Option<&'a dyn Fn(&f32) -> String>,
}
impl<'a> Labels<'a> {
pub fn color(mut self, color: iced::Color) -> Self {
self.color = Some(color);
self
}
pub fn font_size(mut self, font_size: impl Into<iced::Pixels>) -> Self {
self.font_size = Some(font_size.into());
self
}
pub fn format(mut self, format: &'a dyn Fn(&f32) -> String) -> Self {
self.format = Some(format);
self
}
}