Module:Television ratings graph: Difference between revisions

Content deleted Content added
improving to allow manual bar widths and more eps
two options for table headers depending on ep. count
Line 200:
end
-- HeadersIf rowslongest forseason episodesis 120 toor highest number ofmore episodes
if averagelongestseason =>= 120 then
local row = rtable:tag('tr')
-- Headers rows for episodes 1 to highest number of episodes
row:tag('th'):wikitext(season_title)
local row = rtable:tag('tr')
:attr('colspan','2')
row:tag('th'):wikitext(season_title)
:attr('rowspan','2')
:attr('colspan','2')
:attr('rowspan','2')
row:tag('th')
:attr('colspan',longestseason)
:wikitext("Episode number")
-- Average column
if average == 1 then
row:tag('th')
:attr('rowspanscope','2col')
:attr('rowspan','2')
:wikitext("''Average''")
end
local row = rtable:tag('thtr')
:attr('colspan',longestseason)
:wikitext("Episode number")
for i = 1,longestseason do
-- Average column
row:tag('th')
if average == 1 then
row :tagattr('thscope','col')
:attrwikitext('scope','col'i)
end
:attr('rowspan','2')
else
:wikitext("''Average''")
-- Headers rows for episodes 1 to highest number of episodes
end
local row = rtable:tag('tr')
local row = rtable:tag('trth'):wikitext(season_title)
:attr('colspan','2')
for i = 1,longestseason do
for i = 1,longestseason do
row:tag('th')
row:attrtag('scope','colth')
:wikitextattr(i'scope','col')
:wikitext(frame:expandTemplate{ title='abbr', args={ 'Ep.', 'Episode' } } .. ' ' .. i)
end
-- Average column
if average == 1 then
row:tag('th')
:attr('scope','col')
:wikitext("''Average''")
end
end