theta_chart/coord/stick.rs
1#[derive(Debug, Clone, Default)]
2/// Store data for 1 stick rectangle on chart
3pub struct Stick {
4 pub label: String,
5 pub value: f64,
6}
7
8impl Stick {
9 pub fn new(label: String, value: f64) -> Self {
10 Self { label, value }
11 }
12
13 pub fn set_value(&self, value: f64) -> Self {
14 Self {
15 label: self.label.clone(),
16 value,
17 }
18 }
19}