Modulo:Demografia/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 261:
if args.etichette == "dispari" then
-- mostra solo etichette dispari
graph['marks'][4]['from']['transform'] = {{ type = "filter", test = "(datum.num > 1) && (datum.num % 2 == 1)"}}
elseif args.etichette == "pari" then
-- mostra solo etichette pari
graph['marks'][4]['from']['transform'] = {{ type = "filter", test = "(datum.num > 1) && (datum.num % 2 == 0)"}}
elseif args.etichette == "tabella" then
-- nasconde etichette e crea tabella a fianco
Riga 271:
tabella2 = mostraTabella(years, populations, fattore)
end
else
graph['marks'][4]['from']['transform'] = {{ type = "filter", test = "datum.num > 1"}}
end
--if true then return mw.text.jsonEncode(graph) end
Riga 283 ⟶ 281:
if (massimo - minimo > 1) then
graph['scales'][1]['domainMin'] = minimo - (massimo-minimo)*0.0504
graph['scales'][1]['domainMax'] = massimo + (massimo-minimo)*0.0504
end