pub struct PathChart<'a, S, V>where
S: Schema,
V: View<S>,{ /* private fields */ }Expand description
The path-chart widget.
A path-chart represents each unique tuple of the view’s display dimensions as a path in a directory listing. Paths with common sub-paths, starting from the primary dimension (1st), are collapsed in the frame.
See also: DagChart
use flat::*;
let schema = Schemas::two("Animal", "Size");
let dataset = DatasetBuilder::new(schema)
.add(("whale".to_string(), "large".to_string()))
.add(("shark".to_string(), "medium".to_string()))
.add(("shark".to_string(), "small".to_string()))
.add(("tiger".to_string(), "medium".to_string()))
.add(("tiger".to_string(), "medium".to_string()))
.add(("tiger".to_string(), "small".to_string()))
.build();
let view = dataset.count();
let flat = PathChart::new(&view)
.render(Render::default());
assert_eq!(
format!("\n{}", flat.to_string()),
r#"
/Animal /Size |Sum(Count)
/shark |**
/medium
/small
/tiger |***
/medium
/small
/whale |*
/large"#);Implementations§
Auto Trait Implementations§
impl<'a, S, V> Freeze for PathChart<'a, S, V>
impl<'a, S, V> RefUnwindSafe for PathChart<'a, S, V>where
V: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, S, V> Send for PathChart<'a, S, V>
impl<'a, S, V> Sync for PathChart<'a, S, V>
impl<'a, S, V> Unpin for PathChart<'a, S, V>where
S: Unpin,
impl<'a, S, V> UnwindSafe for PathChart<'a, S, V>where
V: RefUnwindSafe,
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more