pub struct LineChart<'a> {
pub series: &'a [LcSeries<'a>],
pub x: u8,
pub x_range: (f64, f64),
pub x_span: f64,
pub y_range: (f64, f64),
pub markers: &'a [LcMarker<'a>],
pub thresholds: &'a [LcThreshold<'a>],
pub flags: u32,
pub name: &'a str,
pub empty: &'a str,
}Expand description
what ui.line_chart shows: the series and how (see the module header of chart.rs); build it with LineChart::new(&series) and the setters, or change the fields
Fields§
§series: &'a [LcSeries<'a>]§x: u8the x axis: LX_SECS (default), LX_NANOS or LX_NUM
x_range: (f64, f64)the visible x range (the points’ units); empty (the default) = the data’s
x_span: f64follow live: without x_range the newest x_span of the data (0 = all of it)
y_range: (f64, f64)the y range; a NaN end (the default) is automatic: the visible values and the thresholds, out to the next tick. (0.0, f64::NAN): from zero (metrics)
markers: &'a [LcMarker<'a>]§thresholds: &'a [LcThreshold<'a>]§flags: u32LC_*
name: &'a strthe chart’s name: the start of its summary (screen readers)
empty: &'a strthe text without points (“” = “Keine Daten” in the UI language)
Implementations§
Source§impl<'a> LineChart<'a>
impl<'a> LineChart<'a>
Sourcepub const fn new(series: &'a [LcSeries<'a>]) -> LineChart<'a>
pub const fn new(series: &'a [LcSeries<'a>]) -> LineChart<'a>
the series over time in seconds, both ranges automatic
Sourcepub const fn y_range(self, lo: f64, hi: f64) -> LineChart<'a>
pub const fn y_range(self, lo: f64, hi: f64) -> LineChart<'a>
the y range (a NaN end: automatic)
Sourcepub const fn markers(self, m: &'a [LcMarker<'a>]) -> LineChart<'a>
pub const fn markers(self, m: &'a [LcMarker<'a>]) -> LineChart<'a>
markers on the x axis (lines and shaded ranges with tags)
Sourcepub const fn thresholds(self, t: &'a [LcThreshold<'a>]) -> LineChart<'a>
pub const fn thresholds(self, t: &'a [LcThreshold<'a>]) -> LineChart<'a>
thresholds (dashed lines with tags)