Bearbeiten von „Felix Englisch“
Die Bearbeitung kann rückgängig gemacht werden. Bitte prüfe den Vergleich unten, um sicherzustellen, dass du dies tun möchtest, und veröffentliche dann unten deine Änderungen, um die Bearbeitung rückgängig zu machen.
Aktuelle Version | Dein Text | ||
Zeile 89: | Zeile 89: | ||
</graph> | </graph> | ||
Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div> | Wahl zum Stadtrat der Hansestadt Lüneburg 2021 (Wahlbeteiligung 56,2 %)</div> | ||
== Zweites Diagramm == | == Zweites Diagramm == | ||
Zeile 217: | Zeile 187: | ||
</graph> | </graph> | ||
<graph mode=interactive> | |||
<graph>{ | { | ||
"version": 1, | |||
"width": 500, | |||
"height": 200, | |||
"padding": { | |||
"top": 10, | |||
"left": 30, | |||
"bottom": 30, | |||
"right": 10 | |||
}, | |||
"data": [ | |||
{ | |||
"name": "table", | |||
"values": [ | |||
{ | |||
"x": 0, | |||
"y": 28, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 0, | |||
"y": 55, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 1, | |||
"y": 43, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 1, | |||
"y": 91, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 2, | |||
"y": 81, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 2, | |||
"y": 53, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 3, | |||
"y": 19, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 3, | |||
"y": 87, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 4, | |||
"y": 52, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 4, | |||
"y": 48, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 5, | |||
"y": 24, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 5, | |||
"y": 49, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 6, | |||
"y": 87, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 6, | |||
"y": 66, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 7, | |||
"y": 17, | |||
"c": 0 | |||
}, | |||
} | { | ||
"x": 7, | |||
"y": 27, | |||
<graph> | "c": 1 | ||
}, | |||
{ | |||
"x": 8, | |||
"y": 68, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 8, | |||
"y": 16, | |||
"c": 1 | |||
}, | |||
{ | |||
"x": 9, | |||
"y": 49, | |||
"c": 0 | |||
}, | |||
{ | |||
"x": 9, | |||
"y": 15, | |||
"c": 1 | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "stats", | |||
"source": "table", | |||
"transform": [ | |||
{ | |||
"type": "facet", | |||
"keys": [ | |||
"data.x" | |||
] | |||
}, | |||
{ | |||
"type": "stats", | |||
"value": "data.y" | |||
} | |||
] | |||
} | |||
], | |||
"scales": [ | |||
{ | |||
"name": "x", | |||
"type": "linear", | |||
"range": "width", | |||
"zero": false, | |||
"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" | |||
}, | |||
{ | |||
"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": "area", | |||
"properties": { | |||
"enter": { | |||
"interpolate": { | |||
"value": "monotone" | |||
}, | |||
"x": { | |||
"scale": "x", | |||
"field": "data.x" | |||
}, | |||
"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> | |||
<graph mode=interactive title="Historical Fertility Rates"> | |||
{ | { | ||
"version": 2, | "version": 2, | ||
"width": | "width": 500, | ||
"height": | "height": 260, | ||
"padding": 12, | |||
"background": "#edf1f7", | |||
"signals": [ | |||
{ | |||
"name": "isDragging", | |||
"init": false, | |||
"streams": [ | |||
{"type": "@handle:mousedown","expr": "true"}, | |||
{"type": "mouseup","expr": "false"} | |||
] | |||
}, | |||
{ | |||
"name": "scaledHandlePosition", | |||
"streams": [ | |||
{ | |||
"type": "mousemove[isDragging]", | |||
"expr": "eventX()", | |||
"scale": {"name": "yearsScale","invert": true} | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "currentYear", | |||
"init": 2000, | |||
"expr": "clamp(parseInt(scaledHandlePosition),1960,2013)" | |||
} | |||
], | |||
"data": [ | "data": [ | ||
{ | { | ||
"name": " | "name": "highlights", | ||
" | "url": "wikiraw:///Extension:Graph/Demo/RawData:FertilityByCountryHistoric-csv", | ||
"transform": [{"type": " | "format": {"type": "csv"}, | ||
"transform": [ | |||
{ | |||
"type": "formula", | |||
"field": "v", | |||
"expr": "parseFloat(datum[''+currentYear])" | |||
} | |||
] | |||
}, | |||
{ | |||
"name": "countries", | |||
"url": "wikiraw:///Extension:Graph/Demo/RawData:WorldMap-iso3-json", | |||
"format": {"type": "topojson","feature": "countries"}, | |||
"transform": [ | |||
{ | |||
"type": "geopath", | |||
"value": "data", | |||
"scale": 80, | |||
"center": [-180,125], | |||
"translate": [0,0], | |||
"projection": "equirectangular" | |||
}, | |||
{ | |||
"type": "lookup", | |||
"keys": ["id"], | |||
"on": "highlights", | |||
"onKey": "id", | |||
"as": ["zipped"], | |||
"default": {"v": null, "country":"No data"} | |||
} | |||
] | |||
} | } | ||
], | ], | ||
"scales": [ | "scales": [ | ||
{ | { | ||
"name": " | "name": "yearsScale", | ||
"type": " | "type": "linear", | ||
"domain": {"data": " | "zero": false, | ||
"range": [ | "domain": [1960,2013], | ||
"range": "width" | |||
}, | |||
{ | |||
"name": "color", | |||
"type": "linear", | |||
"domain": {"data": "countries","field": "zipped.v"}, | |||
"domainMin": 1, | |||
"zero": false, | |||
"range": ["#FFEDBC", "#f83600"] | |||
} | } | ||
], | ], | ||
"marks": [ | "marks": [ | ||
{ | { | ||
" | "name": "yearLabel", | ||
" | "type": "text", | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"x": {" | "x": {"value": 0}, | ||
"y": {" | "y": {"value": 25}, | ||
" | "fontSize": {"value": 32}, | ||
"fontWeight": {"value": "bold"}, | |||
" | "fill": {"value": "steelblue"} | ||
" | |||
}, | }, | ||
"update": {" | "update": {"text": {"signal": "currentYear"}} | ||
} | } | ||
}, | }, | ||
{ | { | ||
" | "name": "scrollLine", | ||
" | "type": "rule", | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"x": {" | "x": {"value": 0}, | ||
"y": {" | "y": {"value": 40}, | ||
" | "x2": {"value": 500}, | ||
"stroke": {"value": "#000"}, | |||
" | "strokeWidth": {"value": 2} | ||
" | |||
} | } | ||
} | |||
}, | |||
{ | |||
"name": "handle", | |||
"type": "path", | |||
"properties": { | |||
"enter": { | |||
"y": {"value": 40}, | |||
"path": {"value": "m-5.5,-10l0,20l11.5,-10l-11.5,-10z"}, | |||
"stroke": {"value": "#880"}, | |||
"strokeWidth": {"value": 2.5} | |||
}, | |||
"update": { | |||
"x": {"scale": "yearsScale","signal": "currentYear"}, | |||
"fill": {"value": "#fff"} | |||
}, | |||
"hover": {"fill": {"value": "#f00"}} | |||
} | |||
}, | |||
{ | |||
"name": "map", | |||
"type": "path", | |||
"from": {"data": "countries"}, | |||
"properties": { | |||
"enter": {"path": {"field": "layout_path"}}, | |||
"update": { | |||
"fill": [ | |||
{ | |||
"test": "datum.zipped.v !== null", | |||
"scale": "color", | |||
"field": "zipped.v" | |||
}, | |||
{"value": "grey"} | |||
] | |||
}, | |||
"hover": {"fill": {"value": "#989898"}} | |||
} | } | ||
} | } | ||
] | ] | ||
} | } | ||
</graph> | </graph> |