liquid_feedback_frontend
view env/ui/bargraph.lua @ 8:374bbc2ff102
Version beta4
Bug fixed, which made it impossible to explicitly become interested in a topic
Fixed positioning of dialog for entering a new suggestion
Display of 404 pages
Bug fixed, which made it impossible to explicitly become interested in a topic
Fixed positioning of dialog for entering a new suggestion
Display of 404 pages
author | bsw |
---|---|
date | Sat Jan 02 12:00:00 2010 +0100 (2010-01-02) |
parents | 80c215dbf076 |
children | 00d1004545f1 |
line source
1 function ui.bargraph(args)
2 ui.container{
3 attr = {
4 class = "bargraph",
5 },
6 content = function()
7 for i, bar in ipairs(args.bars) do
8 if bar.value > 0 then
9 local value = bar.value * args.width / args.max_value
10 ui.container{
11 attr = {
12 style = "width: " .. tostring(value) .. "px; background-color: " .. bar.color .. ";",
13 title = tostring(bar.value)
14 },
15 content = function() slot.put(" ") end
16 }
17 end
18 end
19 end
20 }
21 end