local p = {}
function p.buildRows( frame )
local barwidth = frame.args.barwidth
local data = frame.args.data
local divisor = frame.args.divisor
local numwidth = frame.args.numwidth
local collapsible = frame.args.collapsible
local lines = mw.text.split( data, '\n' )
if not divisor then
local i = 1
local total1, total2 = 0, 0
local a = ''
for parameter in mw.text.gsplit( lines[#lines], ';' ) do
if string.find( parameter, '^ *%A' ) then
a = a..i..parameter..'-'
if i == 6 then
total1 = tonumber( string.gsub( parameter, '%D', '' ) )
if not total1 then
total1 = 0
end
elseif i == 8 then
total2 = tonumber( string.gsub( parameter, '%D', '' ) )
if not total2 then
total2 = 0
end
break
end
i = i + 1
end
end
divisor = math.max( total1, total2 ) / ( 0.95 * barwidth )
return a
end
return divisor
end
return p