Modulo:Demografia/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
aggiungo parametro fonte previsto dal template attuale
Moroboshi (discussione | contributi)
opzioni di visualizzazione etichette
Riga 40:
local values = { }
for i =1,#populations do
values[i] = { year = years[i], population = populations[i], num = i }
end
return values
Riga 108:
marks = {
{
type = "linearea",
from = {data = "table" },
properties = {
Riga 115:
x = {scale = "x",field = "year"},
y = {scale = "y",field = "population"},
strokey2 = {valuescale = "#99CCFFy", value = 0 },
strokeWidthfill = {value = 3"#369"},
opacity = {value = 0.5}
}
}
Riga 201 ⟶ 202:
if args.etichette then
if args.etichette == "1" then
graph['marks'][4]['from']['transform'] = {{ type = "filter", test = "datum._idnum % 2 == 1"}}
elseif args.etichette == "2" then
graph['marks'][4]['from']['transform'] = {{ type = "filter", test = "datum._idnum % 2 == 0"}}
end
end