Module:Dot chart/sandbox: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Don't add border:none to improve compatibility with skin dark mode CSS
 
(5 intermediate revisions by 2 users not shown)
Line 161:
:css('position','absolute')
:css('bottom','0%')
:css('left',table.concat({((100/xLCount*k-100/xLCount)*0.85+15)-4,'%'}))
:wikitext(v)
table.insert(dotTable,tostring(div))
Line 168:
for k,v in pairs(yLabels) do
local div = mw.html.create('div')
div
:css('position','absolute')
if args["x labels"] then
:css('bottom',table.concat({(((((100/yLCount*k-1)100/(yLCount)-1(100/yLCount/3))*85+5))+8100/yLCount/2)*1.502,'%'}))
div
:css('positionleft','absolute0%')
:wikitext(v)
:css('bottom',table.concat({(((k-1)/(yLCount-1))*85)+8.5,'%'}))
:css('left','0%')
:wikitext(v)
else
div
:css('position','absolute')
:css('bottom',table.concat({((k-1)/(yLCount-1))*100,'%'}))
:css('left','0%')
:wikitext(v)
end
table.insert(dotTable,tostring(div))
end
Line 257 ⟶ 248:
:css('text-align','center')
:wikitext(args["top"])
end
args["padding"] = args["padding"] or "10px"
if not args["top"] and size/2 > 10 then
args["padding"] = size/2
end
Line 272 ⟶ 257:
:wikitext(p.data(frame))
div -- Creates box
:css('width', args["width"] or '240px')
:css('display', 'inline-block')
:css('float', args["align"] or 'right')
:css('margin', args["margin"] or '2px')
:css('padding', args["padding"] or table.concat({size/2,'px'}))
:css('background',args["color"] or 'none')
:wikitext(tostring(top))
:wikitext(tostring(container))
:wikitext(legend(args))
:wikitext(args["bottom"])
if args["x labelscolor"] then
div:css('background', args["color"] or 'none')
end
if yesno(args['border']) ~= false then -- Creates box border