dims: &mut Vec<Dim<'a>>,
) {
let base_level = variables[0].1;
- let (show_label, dim_cell, dim_font) = if let Ok(a) = Axis2::try_from(a)
+ let (show_label, dim_cell, dim_font, dim_label) = if let Ok(a) = Axis2::try_from(a)
&& let Some(axis) = axes.get(&(base_level + variables.len()))
&& let Some(label) = &axis.label
{
+ dbg!(label);
let mut dimension_style = AreaStyle::default_for_area(Area::Labels(a));
let style = label.style.get(&styles);
let fg = style;
.then_some(dimension_style.cell_style),
Style::decode_font_style(fg, bg, &mut dimension_style.font_style)
.then_some(dimension_style.font_style),
+ LabelFrame::decode_label(&[label], footnotes),
)
} else {
- (false, None, None)
+ (false, None, None, None)
};
if let Ok(a) = Axis2::try_from(a)
&& let Some(axis) = axes.get(&(base_level + variables.len() - 1))
cats = next_cats;
}
- let mut dimension_label = variables[0]
- .label
- .as_ref()
- .map_or_else(|| Value::new_empty(), |label| Value::new_user_text(label));
+ let mut dimension_label = if let Some(dim_label) = dim_label {
+ dim_label
+ } else if let Some(label) = &variables[0].label {
+ Value::new_user_text(label)
+ } else {
+ Value::new_empty()
+ };
if let Some(dim_cell) = dim_cell {
dimension_label.set_cell_style(dim_cell);
}
test_raw_spvfile("legacy9");
}
+/// Checks for footnotes in dimension labels.
+#[test]
+fn legacy10() {
+ test_raw_spvfile("legacy10");
+}
+
fn test_raw_spvfile(name: &str) {
let input_filename = Path::new("src/spv/testdata")
.join(name)
--- /dev/null
+ Contrast Results (K Matrix)
+ Dependent Variable
+Variable Polynomial Contrast[a] xxxxx
+───────────────────────────────────────────────────────────────────────────────
+Linear Contrast Estimate .147
+ ╶─────────────────────────────────────────────────────────────────────
+ Hypothesized Value 0
+ ╶─────────────────────────────────────────────────────────────────────
+ Difference (Estimate - Hypothesized) .147
+ ╶─────────────────────────────────────────────────────────────────────
+ Std. Error .076
+ ╶─────────────────────────────────────────────────────────────────────
+ Sig. .062
+ ╶─────────────────────────────────────────────────────────────────────
+ 95% Confidence Interval for Difference Lower Bound -.008
+ ╶──────────────────────────────
+ Upper Bound .302
+───────────────────────────────────────────────────────────────────────────────
+Quadratic Contrast Estimate -.033
+ ╶─────────────────────────────────────────────────────────────────────
+ Hypothesized Value 0
+ ╶─────────────────────────────────────────────────────────────────────
+ Difference (Estimate - Hypothesized) -.033
+ ╶─────────────────────────────────────────────────────────────────────
+ Std. Error .076
+ ╶─────────────────────────────────────────────────────────────────────
+ Sig. .666
+ ╶─────────────────────────────────────────────────────────────────────
+ 95% Confidence Interval for Difference Lower Bound -.188
+ ╶──────────────────────────────
+ Upper Bound .122
+───────────────────────────────────────────────────────────────────────────────
+a. Metric = 1,000, 2,000, 3,000