/// Returns this dimension with [Dimension::hide_all_labels] set to true.
pub fn with_all_labels_hidden(self) -> Self {
+ self.with_hide_all_labels(true)
+ }
+
+ /// Returns this dimension with [Dimension::hide_all_labels] set to
+ /// `hide_all_labels`.
+ pub fn with_hide_all_labels(self, hide_all_labels: bool) -> Self {
Self {
- hide_all_labels: true,
+ hide_all_labels,
..self
}
}
}
}
+ let hide_all_labels = if let Some(axis) = axes.get(&base_level)
+ && let Some(style) = axis.major_ticks.style.get(styles)
+ && style.visible == Some(false)
+ {
+ true
+ } else {
+ false
+ };
+
let variables = variables
.into_iter()
.map(|(series, _level)| *series)
)
.with_multiple(cats.into_iter().map(|cb| cb.category))
.with_show_label(show_label),
- );
+ )
+ .with_hide_all_labels(hide_all_labels);
for variable in &variables {
variable.dimension_index.set(Some(dims.len()));
test_raw_spvfile("legacy7");
}
+/// Checks for `Dimension::hide_all_labels`.
+#[test]
+fn legacy8() {
+ test_raw_spvfile("legacy8");
+}
+
fn test_raw_spvfile(name: &str) {
let input_filename = Path::new("src/spv/testdata")
.join(name)
--- /dev/null
+ Warnings
+╭──────────────────────────────────────────────╮
+│The Independent Samples table is not produced.│
+╰──────────────────────────────────────────────╯