From f622f8e53231faa8606917dd523d8f1040696ca5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 23 Jul 2014 15:03:03 -0700 Subject: [PATCH] web: ensure the null commodity appears in legend --- hledger-web/Handler/RegisterR.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-web/Handler/RegisterR.hs b/hledger-web/Handler/RegisterR.hs index 4d875fc22..d214bca63 100644 --- a/hledger-web/Handler/RegisterR.hs +++ b/hledger-web/Handler/RegisterR.hs @@ -122,7 +122,7 @@ registerChartHtml percommoditytxnreports = ], /* [] */ ], - label: '#{c}', + label: '#{shownull c}', color: #{colorForCommodity c}, lines: { show: true, @@ -170,4 +170,4 @@ registerChartHtml percommoditytxnreports = colorForCommodity = fromMaybe 0 . flip lookup commoditiesIndex commoditiesIndex = zip (map fst percommoditytxnreports) [0..] :: [(Commodity,Int)] simpleMixedAmountQuantity = maybe 0 aquantity . headMay . amounts - + shownull c = if null c then " " else c