Carton Rapid Race: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
rimosso errore dalla pagina, da rifare eventualmente con Extension:Graph |
implementato il grafico con la nuova modalità |
||
Riga 66:
|}
<graph>
{
"width": 800,
"height": 600,
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10},
"data": [
{
"name": "table",
"values": [
{"x": "1991", "y": 1, "c":0}, {"x": "1991", "y": 1, "c":1},
{"x": "1992", "y": 6, "c":0}, {"x": "1992", "y": 14, "c":1},
{"x": "1993", "y": 19, "c":0}, {"x": "1993", "y": 4, "c":1},
{"x": "1994", "y": 9, "c":0}, {"x": "1994", "y": 4, "c":1},
{"x": "1995", "y": 23, "c":0}, {"x": "1995", "y": 7, "c":1},
{"x": "1996", "y": 33, "c":0}, {"x": "1996", "y": 17, "c":1},
{"x": "1997", "y": 30, "c":0}, {"x": "1997", "y": 29, "c":1},
{"x": "1998", "y": 50, "c":0}, {"x": "1998", "y": 62, "c":1},
{"x": "1999", "y": 1, "c":0}, {"x": "1999", "y": 1, "c":1},
{"x": "2000", "y": 29, "c":0}, {"x": "2000", "y": 110, "c":1},
{"x": "2001", "y": 38, "c":0}, {"x": "2001", "y": 104, "c":1},
{"x": "2002", "y": 61, "c":0}, {"x": "2002", "y": 106, "c":1},
{"x": "2003", "y": 56, "c":0}, {"x": "2003", "y": 170, "c":1},
{"x": "2004", "y": 72, "c":0}, {"x": "2004", "y": 153, "c":1},
{"x": "2005", "y": 68, "c":0}, {"x": "2005", "y": 181, "c":1},
{"x": "2006", "y": 113, "c":0}, {"x": "2006", "y": 136, "c":1},
{"x": "2007", "y": 85, "c":0}, {"x": "2007", "y": 206, "c":1},
{"x": "2008", "y": 170, "c":0}, {"x": "2008", "y": 143, "c":1},
{"x": "2009", "y": 172, "c":0}, {"x": "2009", "y": 139, "c":1},
{"x": "2010", "y": 148, "c":0}, {"x": "2010", "y": 153, "c":1},
{"x": "2011", "y": 167, "c":0}, {"x": "2011", "y": 153, "c":1},
{"x": "2012", "y": 115, "c":0}, {"x": "2012", "y": 208, "c":1},
{"x": "2013", "y": 157, "c":0}, {"x": "2013", "y": 201, "c":1},
{"x": "2014", "y": 167, "c":0}, {"x": "2014", "y": 238, "c":1}
]
},
{
"name": "stats",
"source": "table",
"transform": [
{"type": "facet", "keys": ["data.x"]},
{"type": "stats", "value": "data.y"}
]
}
],
"scales": [
{
"name": "x",
"type": "ordinal",
"range": "width",
"domain": {"data": "table", "field": "data.x"}
},
{
"name": "y",
"type": "linear",
"range": "height",
"nice": true,
"domain": {"data": "stats", "field": "sum"}
},
{
"name": "color",
"type": "ordinal",
"range": "category10"
}
],
"axes": [
{"type": "x", "scale": "x", "properties": {
"labels": {
"angle": {
"value": -30
},
"align": {
"value": "right"
}
} } },
{"type": "y", "scale": "y"}
],
"marks": [
{
"type": "group",
"from": {
"data": "table",
"transform": [
{"type": "facet", "keys": ["data.c"]},
{"type": "stack", "point": "data.x", "height": "data.y"}
]
},
"marks": [
{
"type": "rect",
"properties": {
"enter": {
"x": {"scale": "x", "field": "data.x"},
"width": {"scale": "x", "band": true, "offset": -1},
"y": {"scale": "y", "field": "y"},
"y2": {"scale": "y", "field": "y2"},
"fill": {"scale": "color", "field": "data.c"}
},
"update": {
"fillOpacity": {"value": 1}
},
"hover": {
"fillOpacity": {"value": 0.5}
}
}
}
]
}
]
}
</graph>
==Premiazione==
|