for k = 3,height-1 do
write_command(conn,"widget_add "..pageid.." "..pageid..".place"..trim(tostring(k)).." string")
end
- for k=1,width do
- write_command(conn,"widget_add "..pageid.." "..pageid..".bar"..trim(tostring(k)).." vbar")
- end
write_command(conn,"widget_set "..pageid.." "..pageid..".title \"".. pagetitle.."\"")
end
end
local minval = 99999999
for k=width,1,-1 do
if row then
- val = row["val"]
+ val = row["val"] * def["scale"]
row = cur:fetch ({}, "a")
else
val = nil
local len = math.max(string.len(minvalstr),string.len(maxvalstr))
write_command(conn,"widget_set "..pageid.." "..pageid..".max "..trim(tostring(width-string.len(maxvalstr)+1)).." 2 "..maxvalstr)
for k = 3,height-1 do
- write_command(conn,"widget_set "..pageid.." "..pageid..".place"..trim(tostring(k)).." "..trim(tostring(width-len+1)).." "..k.." \""..string.rep("-",len).."\"")
+ write_command(conn,"widget_set "..pageid.." "..pageid..".place"..trim(tostring(k)).." "..trim(tostring(width-len+1)).." "..k.." \" "..string.rep("-",len-1).."\"")
end
write_command(conn,"widget_set "..pageid.." "..pageid..".min "..trim(tostring(width-string.len(minvalstr)+1)).." "..height.." "..minvalstr)
local m = width
+ for k=1,width do
+ write_command(conn,"widget_del "..pageid.." "..pageid..".bar"..trim(tostring(k)))
+ end
for k = width-len,1,-1 do
val = vals[m]
if val then
else
h = 0
end
+ write_command(conn,"widget_add "..pageid.." "..pageid..".bar"..trim(tostring(k)).." vbar")
write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." "..k.." "..height.." "..h)
m = m - 1
end
- for k= m,1,-1 do
- write_command(conn,"widget_set "..pageid.." "..pageid..".bar"..trim(tostring(k)).." 0 0 0")
- end
end
end
end