Module:Dot chart/sandbox: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 34:
for str in string.gmatch(args['x labels'], '([^, ]+)') do
table.insert(xLabels, str)
xLCount = xLCount + 1
end
end
Line 41:
for str in string.gmatch(args['y labels'], '([^, ]+)') do
table.insert(yLabels, str)
yLCount = yLCount + 1
end
end
Line 53:
and not string.match(k, 'color%-') then
table.insert(yTable, v)
yCount = yCount + 1
end
end
Line 63:
end
while( cols > i) do
local xValue = ((100i / cols * i) + (100 / cols /- 10)1) * 1.1100
i = i + 1
while( tonumber(args['dots']) > j) do
j = j + 1
table.insert(xTable, xValue)
Line 146:
div
:css('position', 'absolute')
:css('bottom', y * 0.85 + 15 .. '%')
:css('left', x * 0.85 + 15 .. '%')
:wikitext(tostring(innerDiv))
table.insert(dotTable, tostring(div))
Line 153:
for k, v in pairs(xLabels) do
local innerDiv = mw.html.create('div')
local div = mw.html.create('div')
innerDiv
:css('position', 'relative')
:css('left', '-50%')
:wikitext(v)
div
:css('position', 'absolute')
:css('bottom', '0%')
:css('left', (100 / xLCount * k - 1001) / (xLCount - 1) * 0.85 + 15100 .. '%')
:wikitext(vtostring(innerDiv))
table.insert(dotTable, tostring(div))
end
Line 166 ⟶ 171:
div
:css('position', 'absolute')
:css('bottom', (((k - 1) / (yLCount - 1)) * 85) + 8.5100 .. '%')
:css('left', '0%')
:wikitext(v)