web: ensure the null commodity appears in legend

This commit is contained in:
Simon Michael 2014-07-23 15:03:03 -07:00
parent cf6da3af5d
commit f622f8e532

View File

@ -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