// Insert corner text, but only if there's a stub and only if row labels
// are not in the corner.
- if (self.corner_text.is_some() || self.look.row_label_position == LabelPosition::Corner)
+ if self.corner_text.is_some()
+ && self.look.row_label_position == LabelPosition::Nested
&& stub.x() > 0
&& stub.y() > 0
{
}
if dimension_label_position == LabelPosition::Corner {
- dbg!(v_ofs..v_ofs + 1, 0..h_ofs);
- dbg!(&self.dimension.root);
table.put(
Rect2::new(v_ofs..v_ofs + 1, 0..h_ofs),
CellInner {
value: self.dimension.root.name.clone(),
},
);
- dbg!(&table);
}
}
}
#[test]
fn d1_r() {
- print!("{}", d1("Rows", Axis3::Y));
+ assert_eq!(
+ d1("Rows", Axis3::Y).to_string(),
+ "\
+Rows
+╭──┬─╮
+│a │ │
+├──┼─┤
+│a1│0│
+│a2│1│
+│a3│2│
+╰──┴─╯
+"
+ );
}
fn test_look() -> Arc<Look> {