Difference between revisions 23960717 and 23960990 on svwikip = {} 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) h1 = h1 .. mw.text.tag('td', {style="padding:0 4px;width:5em", align="right", valign="top"}, 'Folkmängd') areaenhet = args.areaenhet or '[[hektar|ha]]' h1 = h1 .. mw.text.tag('td', {style="padding:0 4px;", align="right", valign="top"}, 'Areal '.. areaenhet) text = text .. mw.text.tag('tr', {style="font-size:88%;"}, h1) ⏎ ⏎ for i = fran, till, step do local pu = 'inv' .. i if tonumber(args[pu]) then local h5 = 'area' .. i local h6 = args[h5] or '' local h4 = math.floor(480*tonumber(args[pu]/max)) .. '' local h2 = mw.text.tag('td', {colspan="2", style="padding-right:0.4em; padding-left:0.4em"}, i) local h3 = mw.text.tag('div', {style="margin-top:0; margin-bottom:0; background:#B0C4DE; height:10px; width:"..h4.."px; overflow:hidden"}, '  ') 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]) h2 = h2 .. mw.text.tag('td', {style="min-width:3em;padding-left:0.4em", align="right"}, h6) 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 All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://sv.wikipedia.org/w/index.php?diff=prev&oldid=23960990.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|