Module:Television ratings graph: Difference between revisions

Content deleted Content added
Widths
Correct calculate of widths
Line 55:
-- Create the timeline
-- Number of actual viewer numbers
local numberargs = 0
for k,v in pairs(args) do
if not string.match(k,'[^%d]+') and not string.match(v,'[^%d\.]+') then numberargs = numberargs + 1 end
end
-- Bar width
local barwidth
if #argsnumberargs < 20 then barwidth = 8
elseif #argsnumberargs >= 20 and #argsnumberargs < 50 then barwidth = 67
elseif #argsnumberargs >= 50 and #argsnumberargs < 80 then barwidth = 46
elseif #argsnumberargs >= 80 then barwidth = 35
end