use super::*;
#[derive(Clone, Debug, lombok_macros::Data, PartialEq)]
pub struct Scale {
#[get(type(copy))]
pub kind: ScaleKind,
#[get(type(copy))]
pub domain_min: f64,
#[get(type(copy))]
pub domain_max: f64,
#[get(type(copy))]
pub range_min: f64,
#[get(type(copy))]
pub range_max: f64,
pub categories: Vec<String>,
#[get(type(copy))]
pub log_base: f64,
#[get(type(copy))]
pub band: f64,
#[get(type(copy))]
pub count: usize,
}
#[derive(Clone, Debug, PartialEq)]
pub struct AxisTick {
pub value: f64,
pub label: String,
pub position: f64,
}
#[derive(Clone, Debug, lombok_macros::Data, PartialEq)]
pub struct AxisLayout {
#[get(type(copy))]
pub index: usize,
#[get(type(copy))]
pub kind: AxisType,
pub scale: Scale,
pub ticks: Vec<AxisTick>,
#[get(type(copy))]
pub side: AxisSide,
#[get(type(copy))]
pub offset: f64,
#[get(type(copy))]
pub label_space: f64,
#[get(type(clone))]
pub name: Option<String>,
#[get(type(copy))]
pub name_space: f64,
#[get(type(copy))]
pub show: bool,
pub labels: Vec<AxisTick>,
#[get(type(copy))]
pub label_interval: usize,
}
#[derive(Clone, Debug, lombok_macros::Data, PartialEq)]
pub struct GridLayout {
#[get(type(copy))]
pub index: usize,
#[get(type(copy))]
pub rect: BBox,
pub x_axes: Vec<AxisLayout>,
pub y_axes: Vec<AxisLayout>,
}
#[derive(Clone, Debug, PartialEq)]
pub struct SeriesPoint {
pub x: f64,
pub y: f64,
pub value: f64,
pub name: String,
pub data_index: usize,
}
#[derive(Clone, Debug, PartialEq)]
pub struct SeriesLayout {
pub index: usize,
pub kind: SeriesType,
pub name: String,
pub grid_index: usize,
pub points: Vec<SeriesPoint>,
pub stack: Option<String>,
pub stack_index: usize,
pub stack_size: usize,
pub plot_rect: BBox,
pub band_width: f64,
}
#[derive(Clone, Debug, Default, lombok_macros::Data, PartialEq)]
pub struct ChartLayout {
#[get(type(copy))]
pub width: f64,
#[get(type(copy))]
pub height: f64,
pub grids: Vec<GridLayout>,
pub series: Vec<SeriesLayout>,
pub geo: Vec<GeoLayout>,
#[get(type(copy))]
pub title_rect: Option<BBox>,
#[get(type(copy))]
pub legend_rect: Option<BBox>,
#[get(type(copy))]
pub plot_rect: BBox,
}
#[derive(Clone, Debug, PartialEq)]
pub struct VisualPiece {
pub min: f64,
pub max: f64,
pub color: Color,
}
#[derive(Clone, Debug, lombok_macros::Data, PartialEq)]
pub struct VisualMap {
#[get(type(copy))]
pub visual_type: VisualMapType,
#[get(type(copy))]
pub min: f64,
#[get(type(copy))]
pub max: f64,
pub colors: Vec<Color>,
#[get(type(copy))]
pub split_number: usize,
pub pieces: Vec<VisualPiece>,
#[get(type(copy))]
pub out_of_range: Option<Color>,
}