MCPcopy Create free account
hub / github.com/alceal/plotlars / extract_strings

Function extract_strings

crates/plotlars-plotters/src/converters/trace.rs:43–49  ·  view source on GitHub ↗
(data: &ColumnData)

Source from the content-addressed store, hash-verified

41}
42
43pub(crate) fn extract_strings(data: &ColumnData) -> Vec<String> {
44 match data {
45 ColumnData::String(v) => v.iter().map(|x| x.clone().unwrap_or_default()).collect(),
46 ColumnData::Numeric(v) => v.iter().map(|x| format!("{}", x.unwrap_or(0.0))).collect(),
47 ColumnData::DateTime(v) => v.iter().map(|x| format!("{}", x.unwrap_or(0))).collect(),
48 }
49}
50
51fn extract_f64_options(data: &ColumnData) -> Vec<Option<f64>> {
52 match data {

Callers 15

compute_numeric_rangesFunction · 0.70
compute_bar_rangesFunction · 0.70
collect_bar_categoriesFunction · 0.70
render_boxplotFunction · 0.50
draw_boxes_verticalFunction · 0.50
draw_boxes_horizontalFunction · 0.50
render_bar_verticalFunction · 0.50
render_bar_horizontalFunction · 0.50
render_numericFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected