Modulo:Graph: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Moroboshi (discussione | contributi)
Nessun oggetto della modifica
Moroboshi (discussione | contributi)
fix vari
Riga 24:
if value then
values[index] = value
colors[index] = args[color_string .. index_s] or cfg.default_colors[index] or cfg.default_color
labels[index] = args[label_string .. index_s] or 'xxx'
index = index + 1
else
Riga 38:
graph.data[1] = { name = "table"}
graph.data[1].values = values
graph.data[1].transform = { { type = "pie", value = "data" } }
graph.marks = {}
graph.marks[1] = {}
Riga 44:
graph.marks[1].from = { data = "table"}
graph.marks[1].properties = {}
graph.marks[1].properties.enter = {}
graph.marks[1].properties.enter.x = { group = "width", mult = 0.5 }
graph.marks[1].properties.enter.y = { group = "widthheight", mult = 0.5 }
graph.marks[1].properties.enter.startAngle = {field = "startAngle"}
graph.marks[1].properties.enter.endAngle = {field = "endAngle"}
graph.marks[1].properties.enter.innerRadius = {value = 0}
graph.marks[1].properties.enter.outerRadius = {value = tonumber(args[cfg.localization.radius]) or 200 }
graph.marks[1].properties.enter.outerRadiusstroke = {value = "#000"}
graph.marks[1].properties.update = { fill = {value = "#ccc"} }
graph.marks[1].properties.hover = { fill = {value = "pink"} }