spaces.rsx 417 B

1234567891011121314
  1. rsx! {
  2. if let Some(Some(record)) = &*records.read_unchecked() {
  3. {
  4. let (label, value): (Vec<String>, Vec<f64>) = record
  5. .iter()
  6. .rev()
  7. .map(|d| (d.model.clone().expect("work"), d.row_total))
  8. .collect();
  9. rsx! {
  10. BarChart { id: "bar-plot".to_string(), x: value, y: label }
  11. }
  12. }
  13. }
  14. }