Modulo:Grafico XY: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 66:
type = "ordinal",
___domain = { data = "nomi", field = "testo"},
range = { }
},
{
name = "colori2",
type = "ordinal",
___domain = { data = "annota", field = "testo"},
range = { }
}
Riga 89 ⟶ 95:
{
fill = "colori",
title = "",
orient = "top-left",
offset = 8,
shape = {value = "square"},
strokeWidth = 0
},
{
fill = "colori2",
title = "",
orient = "top-left",
Riga 240 ⟶ 254:
end
if args.legenda then graph['legends'][1]['orient'] = args.legenda end
-- annotazioni
graph['data'][numero+2] = {
name = "area",
values = { }
}
lg = 1
while (args['area'..lg]) do
graph['data'][numero+2]['values'][lg] = { testo = args['area'..lg], x1 = args['area'..lg..'_x1'], x2 = args['area'..lg..'_x2'] }
graph['scales'][4]['range'][lg] = args['area'..lg..'_colore'] or clr[lg]
lg = lg +1
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 = {}
|