Detect if any trace requests horizontal orientation.
(traces: &[TraceIR])
| 78 | |
| 79 | /// Detect if any trace requests horizontal orientation. |
| 80 | fn is_horizontal(traces: &[TraceIR]) -> bool { |
| 81 | traces.iter().any(|t| { |
| 82 | if let TraceIR::BoxPlot(ir) = t { |
| 83 | matches!(ir.orientation, Some(Orientation::Horizontal)) |
| 84 | } else { |
| 85 | false |
| 86 | } |
| 87 | }) |
| 88 | } |
| 89 | |
| 90 | pub(super) fn render_boxplot<DB: DrawingBackend>( |
| 91 | root: &DrawingArea<DB, plotters::coord::Shift>, |