Modulo:Graph: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
aggiorno
aggiorno
Riga 461:
-- Symbols scale
local symbolsScale
if args.symbols then symbolsScale = { name = "symbolssymShape", type = "ordinal", range = stringArray(args.symbols), ___domain = { data = "chart", field = "series" } } end
-- for bar charts with multiple series: each series is grouped by the x value, therefore the series need their own scale within each x group
local groupScale
Riga 531:
from = { data = "chart" },
properties = {
enter = {
update x = { strokescale = {"x", scalefield = "colorx"} },
{
xy = { scale = "xy", field = "xy" },
yshape = { scale = "ysymShape", field = "yseries" },
shapestroke = { scale = "symbolscolor", field = "series" },
fill = { scale = "color", field = "series" },
},
{},
update = { stroke = { scale = "color"} }
}
}
if args.symbol_size then symbolsMarks.properties.enter.size = { value = args.symbol_size } end
if alphaScale then
symbolmarks.properties.enter.fillOpacity = { scale = "transparency", field = "series" }
symbolmarks.properties.enter.strokeOpacity = { scale = "transparency", field = "series" }
end
end
if #args.y == 1 then
Line 554 ⟶ 558:
if symbolsScale then
symbolsMarks.properties.enter.shape.field = "series"
symbolsMarks.properties.update.stroke.field = "series"
end
if alphaScale then marks.properties.update[colorField .. "Opacity"].field = "series" end