dotfiles/.zsh/.functions/hl-stack
2026-08-15 19:39:06 +01:00

11 lines
464 B
Text

# STACKED BAR RENDERING
# render stacked proportional bars across time periods
local chart_script="$HOME/.local/bin/hledger-charts"
local journal="${HLEDGER_JOURNAL:-$HOME/obsidian/finances/journals/2026.journal}"
if [[ -x "$chart_script" ]]; then
"$chart_script" stacked --journal "$journal" "${@:-expenses}"
else
echo "warning: hledger-charts not found, defaulting to monthly tabular matrix" >&2
hledger -f "$journal" balance -M "${@:-expenses}"
fi