openpine_vm/visuals/
bgcolors.rs1use openpine_compiler::instructions::Color;
2use serde::{Deserialize, Serialize};
3
4use crate::{series::Series, visuals::PlotDisplay};
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct BackgroundColor {
9 pub colors: Series<Option<Color>>,
11 pub offset: i32,
13 pub editable: bool,
15 pub show_last: Option<usize>,
17 pub title: Option<String>,
19 pub display: PlotDisplay,
21 pub force_overlay: bool,
23}
24
25impl BackgroundColor {
26 pub(crate) fn append_new(&mut self) {
27 self.colors.append_new();
28 }
29}