feat: add Axis::None for hidden dimensions with implicit aggregation
Categories on the None axis are excluded from the grid and cell keys. When evaluating cells, values across hidden dimensions are aggregated using a per-measure function (default SUM). Adds evaluate_aggregated to Model, none_cats to GridLayout, and 'n' shortcut in TileSelect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -117,6 +117,7 @@ pub fn format_md(model: &Model) -> String {
|
||||
Some(sel) => writeln!(out, "{}: page, {}", cat, sel).unwrap(),
|
||||
None => writeln!(out, "{}: page", cat).unwrap(),
|
||||
},
|
||||
Axis::None => writeln!(out, "{}: none", cat).unwrap(),
|
||||
}
|
||||
}
|
||||
if !view.number_format.is_empty() {
|
||||
@ -315,6 +316,7 @@ pub fn parse_md(text: &str) -> Result<Model> {
|
||||
let axis = match rest {
|
||||
"row" => Axis::Row,
|
||||
"column" => Axis::Column,
|
||||
"none" => Axis::None,
|
||||
_ => continue,
|
||||
};
|
||||
view.axes.push((cat.to_string(), axis));
|
||||
|
||||
Reference in New Issue
Block a user