mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 03:42:25 +03:00
web: ensure the null commodity appears in legend
This commit is contained in:
parent
cf6da3af5d
commit
f622f8e532
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user