Modulo:Sandbox/Aottolini/Graph: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
v7 |
Nessun oggetto della modifica |
||
(2 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 286:
:css('border-bottom-width', tostring(radius) .. 'px')
:css('border-left-width', 0)
:css('border-
graph:node(div)
div = mw.html.create('div'):cssText('position:absolute;line-height:0;border-style:solid;right:0;top:0')
Riga 293:
:css('border-bottom-width', tostring(radius) .. 'px')
:css('border-left-width', 0)
:css('border
graph:node(div)
elseif quadrante == 2 then -- 50..75 %
Riga 302:
:css('border-bottom-width', 0)
:css('border-left-width', 0)
:css('border-
graph:node(div)
div = mw.html.create('div'):cssText('position:absolute;line-height:0;border-style:solid;left:0;top:0')
Riga 309:
:css('border-bottom-width', tostring(radius) .. 'px')
:css('border-left-width', 0)
:css('border
graph:node(div)
elseif quadrante == 3 then -- 75..100%
Riga 318:
:css('border-bottom-width', 0)
:css('border-left-width', tostring(radius * math.tan(math.pi * (value - 25) / 50)) .. 'px')
:css('border-
graph:node(div)
div = mw.html.create('div'):cssText('position:absolute;line-height:0;border-style:solid;left:0;top:0')
Riga 325:
:css('border-bottom-width', tostring(radius) .. 'px')
:css('border-left-width', 0)
:css('border
graph:node(div)
div = mw.html.create('div'):cssText('position:absolute;line-height:0;border-style:solid;left:0;top:0')
Riga 332:
:css('border-bottom-width', tostring(2*radius) .. 'px')
:css('border-left-width', 0)
:css('border
graph:node(div)
end
end
Riga 355 ⟶ 347:
cumulato = data[#args.values - pos + 1]
end
local graph = mw.html.create('div'):addClass('mw-no-invert'):cssText('
:css('width', tostring(args.outer_radius * 2) .. 'px')
:css('height', tostring(args.outer_radius * 2) .. 'px')
:css('border-radius', tostring(args.outer_radius) .. 'px')
:css('background-color', args.colors[#args.values])
for pos = 1,#args.values do
add_slice(graph, data[pos], args.colors[#args.values - pos + 1], args.outer_radius)
|