use derive_builder::Builder;
#[derive(Builder, Clone, Debug)]
#[builder(setter(into, strip_option), default)]
pub struct BasePlotOptions {
#[builder(default = "400")]
pub width: u32,
#[builder(default = "400")]
pub height: u32,
#[builder(default = "10")]
pub margin: u32,
#[builder(default = "50")]
pub x_label_area_size: u32,
#[builder(default = "50")]
pub y_label_area_size: u32,
#[builder(default = "\"Density Plot\".to_string()")]
pub title: String,
}
impl Default for BasePlotOptions {
fn default() -> Self {
Self {
width: 400,
height: 400,
margin: 10,
x_label_area_size: 50,
y_label_area_size: 50,
title: "Density Plot".to_string(),
}
}
}
impl BasePlotOptions {
pub fn new() -> BasePlotOptionsBuilder {
BasePlotOptionsBuilder::default()
}
}