#[derive(Clone, Debug, Default)]
pub struct GuideLegend {
pub title: Option<String>,
pub ncol: Option<usize>,
pub nrow: Option<usize>,
pub reverse: bool,
}
impl GuideLegend {
pub fn new() -> Self {
Self::default()
}
pub fn with_title(mut self, title: &str) -> Self {
self.title = Some(title.to_string());
self
}
pub fn with_ncol(mut self, ncol: usize) -> Self {
self.ncol = Some(ncol);
self
}
pub fn with_nrow(mut self, nrow: usize) -> Self {
self.nrow = Some(nrow);
self
}
pub fn reverse(mut self) -> Self {
self.reverse = true;
self
}
}