Difference between revisions 23961365 and 23961463 on svwiki

p = {}
 
function p.diagram(frame)
	local pFrame = frame:getParent()
	local args = pFrame.args
	local text = ''
	local namn = args.namn or frame.args.namn
	local max = -math.huge
(contracted; show full)			if fkr then 
				if i < 0 then
					h7 = h7 .. ' f.&nbsp;Kr.'
				else
					h7 = h7 .. ' e.&nbsp;Kr.'
				end
			end
			local h8
= = 'color'  ..  i
			if args[h8] then 
				color = args[h8]
			end
			local h9 = 'typ' .. i
			local color2 = color
			if args[h9] == 'småort' then
				color2 = '#d0e0f5'
			elseif args[h9] == 'tätort' then
				color2 = '#B0C4DE'
			end

			local h2 = mw.text.tag('td', {colspan="2", style="padding-right:0.4em; padding-left:0.4em"}, h7)
			local h3 = mw.text.tag('div', {style="margin-top:0; margin-bottom:0; background:"..color2.."; height:10px; width:"..h4.."px; overflow:hidden"}, '&#160; ')
			h2 = h2 .. mw.text.tag('td', {style="border-left:solid 1px silver;border-right:solid 1px silver;"}, h3)
			h2 = h2 .. mw.text.tag('td', {style="min-width:3em;padding-left:0.4em", align="right"}, args[pu])
			if areakolumn then
				local h5 = 'area' .. i
				local h6 = args[h5] or ''
				h2 = h2 .. mw.text.tag('td', {style="min-width:3em;padding-left:0.4em", align="right"}, h6)
			end
			text = text .. mw.text.tag('tr', {}, h2)
		end
	end

	text = mw.text.tag('table', {cellspacing="0", cellpadding="0", style="clear:none;float:none;border:silver solid 1px; font-size:90%; padding:0.4em;margin:0.4em;width:650px"}, text)
	
	return text --.. '; ' .. fran2 .. '-' .. till2
end
 
return p