Skip to main content

nominal_api/conjure/objects/themes/api/
time_series_chart_theme_v1.rs

1/// Theme parameters specific to the time series chart.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct TimeSeriesChartThemeV1 {
17    #[serde(rename = "xAxisTickFontSize")]
18    x_axis_tick_font_size: i32,
19    #[serde(rename = "xAxisTickFontColor")]
20    x_axis_tick_font_color: super::HexColor,
21    #[serde(rename = "yAxisTitleFontSize")]
22    y_axis_title_font_size: i32,
23    #[serde(rename = "yAxisTickFontSize")]
24    y_axis_tick_font_size: i32,
25    #[builder(default, into)]
26    #[serde(
27        rename = "thresholdLineWidth",
28        skip_serializing_if = "Option::is_none",
29        default
30    )]
31    threshold_line_width: Option<i32>,
32}
33impl TimeSeriesChartThemeV1 {
34    /// The font size of the x-axis ticks.
35    #[inline]
36    pub fn x_axis_tick_font_size(&self) -> i32 {
37        self.x_axis_tick_font_size
38    }
39    /// The font color of the x-axis ticks.
40    #[inline]
41    pub fn x_axis_tick_font_color(&self) -> &super::HexColor {
42        &self.x_axis_tick_font_color
43    }
44    /// The font size of the y-axis labels.
45    #[inline]
46    pub fn y_axis_title_font_size(&self) -> i32 {
47        self.y_axis_title_font_size
48    }
49    /// The font size of the y-axis ticks.
50    #[inline]
51    pub fn y_axis_tick_font_size(&self) -> i32 {
52        self.y_axis_tick_font_size
53    }
54    /// The line thickness in px of the threshold line.
55    #[inline]
56    pub fn threshold_line_width(&self) -> Option<i32> {
57        self.threshold_line_width.as_ref().map(|o| *o)
58    }
59}