openpine_vm/visuals/
plotarrow.rs1use openpine_compiler::instructions::Color;
2use serde::{Deserialize, Serialize};
3
4use crate::{
5 series::Series,
6 visuals::{PlotDisplay, PlotFormat},
7};
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
11pub struct PlotArrow {
12 pub title: Option<String>,
14 pub series: Series<Option<f64>>,
16 pub up_colors: Series<Option<Color>>,
18 pub down_colors: Series<Option<Color>>,
20 pub offset: i32,
22 pub min_height: usize,
24 pub max_height: usize,
26 pub editable: bool,
28 pub show_last: Option<usize>,
30 pub display: PlotDisplay,
32 pub format: Option<PlotFormat>,
34 pub precision: Option<i32>,
36 pub force_overlay: bool,
38}
39
40impl PlotArrow {
41 pub(crate) fn append_new(&mut self) {
42 self.series.append_new();
43 self.up_colors.append_new();
44 self.down_colors.append_new();
45 }
46}