Modulo:Grafico XY: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 110:
}
},
marks = { }
}{
type = "rect",
from = { data = "area" },
properties = {
enter = {
x = {scale = "x",field = "x1"},
x2 = {scale = "x",field = "x2"},
y = {value = 0},
y2 = {signal = "height"},
fill = {scale = "colori2", field = "testo" },
opacity = {value =0.2 }
}
}
}
}
}
-- titoli assi
Riga 175 ⟶ 190:
}
graph['data'][i]['values'] = dt[i]
graph['marks'][1+i] = {
type = "line",
from = {data = "tab"..i },
Riga 189 ⟶ 204:
}
}
graph['marks'][1+i+numero] = {
type = "symbol",
from = {data = "tab"..i },
Riga 202 ⟶ 217:
}
}
graph['marks'][1+i+2*numero] = {
type = "text",
from = { data = "tab"..i },
Riga 220 ⟶ 235:
-- colori
if args['colore'..i] then
graph['marks'][1+i]['properties']['enter']['stroke']['value'] = args['colore'..i]
graph['marks'][1+i+numero]['properties']['enter']['stroke']['value'] = args['colore'..i]
graph['scales'][3]['range'][i] = args['colore'..i]
end
Riga 227 ⟶ 242:
if args['etichette'..i] then
if args['etichette'..i] == 'dispari' then
graph['marks'][1+i+2*numero]['from']['transform'] = {{ type = "filter", test = "datum.num % 2 == 1"}}
elseif args['etichette'..i] == 'pari' then
graph['marks'][1+i+2*numero]['from']['transform'] = {{ type = "filter", test = "datum.num % 2 == 0"}}
elseif args['etichette'..i] == 'no' then
graph['marks'][1+i+2*numero]['from']['transform'] = {{ type = "filter", test = "datum.num < 1"}}
end
end
Riga 237 ⟶ 252:
if args['mostra'..i] then
if args['mostra'..i] == '1' then
graph['marks'][1+numero+i]['from']['transform'] = {{ type = "filter", test = "datum.num < 1"}}
elseif args['mostra'..i] == '2' then
graph['marks'][1+i]['from']['transform'] = {{ type = "filter", test = "datum.num < 1"}}
end
end
Riga 266 ⟶ 281:
lg = lg +1
end
if args.area_legenda then graph['legends'][12]['orient'] = args.area_legenda end
graph['marks'][3*numero+1] = {
type = "rect",
from = { data = "area" },
properties = {
enter = {
x = {scale = "x",field = "x1"},
x2 = {scale = "x",field = "x2"},
y = {value = 0},
y2 = {signal = "height"},
fill = {scale = "colori2", field = "testo" },
opacity = {value =0.2 }
}
}
}
if args.area_legenda then graph['legends'][1]['orient'] = args.area_legenda end
 
local ris = {}