Modulo:Grafico XY: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica |
+legenda |
||
Riga 58:
transform = { { type = "sort", by = "nx" } },
values = { }
},
{
name = "nomi",
values = { }
}
},
Riga 75 ⟶ 79:
nice = true,
___domain = {fields = {{data = "tab",field = "ny"}, {data = "tab2",field = "ny"}, {data = "tab3",field = "ny"}}}
},
{
name = "colori",
type = "ordinal",
___domain = { data = "nomi", field = "testo"},
range = { "#1f77b4", "b80000", "#00c000" }
}
},
Riga 92 ⟶ 102:
format = "d",
layer = "back"
}
},
legends = {
{
fill = "colori",
title = "",
orient = "top-left",
offset = 8,
shape = "square",
strokeWidth = 0
}
},
Riga 259 ⟶ 279:
graph['marks'][1]['properties']['enter']['stroke']['value'] = args.colore1
graph['marks'][4]['properties']['enter']['stroke']['value'] = args.colore1
graph['scales'][3]['range'][1] = args.colore1
end
if args.colore2 then
graph['marks'][2]['properties']['enter']['stroke']['value'] = args.colore2
graph['marks'][5]['properties']['enter']['stroke']['value'] = args.colore2
graph['scales'][3]['range'][2] = args.colore2
end
if args.colore3 then
graph['marks'][3]['properties']['enter']['stroke']['value'] = args.colore3
graph['marks'][6]['properties']['enter']['stroke']['value'] = args.colore3
graph['scales'][3]['range'][3] = args.colore3
end
-- opzioni etichette
Riga 317 ⟶ 340:
end
end
-- legenda
if args.nome1 then graph['data'][4]['values'][1] = { testo = args.nome1 } end
if args.nome2 then graph['data'][4]['values'][2] = { testo = args.nome2 } end
if args.nome3 then graph['data'][4]['values'][3] = { testo = args.nome3 } end
if args.legenda then graph['legends'][1]['orient'] = args.legenda end
local ris = {}
|