Module:Television ratings graph: Difference between revisions

Content deleted Content added
Update
Further updates
Line 11:
hex = hex:gsub('#', '')
if #hex == 3 then
return tonumber("0x"..hex:sub(1,1)..hex:sub(1,1))/256, tonumber("0x"..hex:sub(2,2))/256, tonumber("0x"..hex:sub(32,32))/256,
tonumber("0x"..hex:sub(3,3)..hex:sub(3,3))/256
else
return tonumber("0x"..hex:sub(1,2))/256, tonumber("0x"..hex:sub(3,4))/256, tonumber("0x"..hex:sub(5,6))/256
Line 139 ⟶ 140:
for k,v in pairs(args) do
if tonumber(k) ~= nil then
if v == '-' or (average == 1 and args[k+1] == nil) then
if season > 1 andthen
if this_episodes < max_episodes then
row:node(TVRG.NACell(frame,"N/A"):attr('colspan',max_episodes-this_episodes))
end
if average == 1 then
if v ~= '' then
row:tag('td'):wikitext(args[k+1] ~= nil and args[k-1] or v)
else
row:node(TVRG.NACell(frame,"TBD"))
end
this_episodes = this_episodes + 1
end
end
rowif v == rtable:tag('tr-') then
row = rtable:tag('thtr')
row:attrtag('scope','colth')
:attr('scope','row')
:wikitext(args["legend" .. season] and "''"..args["legend" .. season].."''" or 'Season ' .. season)
this_episodes = 0
season = season + 1
else end
elseif average == 0 or (average == 1 and args[k+1] ~= '-' and args[k+1] ~= nil) then
if v ~= '' then
row:tag('td'):wikitext(v)
Line 161 ⟶ 175:
end
end
 
if this_episodes < max_episodes then
row:node(TVRG.NACell(frame,"N/A"):attr('colspan',max_episodes-this_episodes))