Herzlich Willkommen zum Mitglieder-Wiki von   Wikimedia Österreich.
Für ein Benutzerkonto schreibe bitte an   verein [at] wikimedia.at

Änderungen

Zur Navigation springen Zur Suche springen
Die Seite wurde neu angelegt: „== Test 1 == <graph mode=interactive> { "version": 2, "width": 300, "height": 80, "padding": 12, "background": "#edf1f7", "marks": [ { "…“
== Test 1 ==

<graph mode=interactive>
{
"version": 2,
"width": 300,
"height": 80,
"padding": 12,
"background": "#edf1f7",
"marks": [
{
"name": "scrollLine",
"type": "rule",
"properties": {
"enter": {
"x": {"value": 0},
"y": {"value": 40},
"x2": {"value": 300},
"stroke": {"value": "#000"},
"strokeWidth": {"value": 2}
}
}
},
{
"name": "handle",
"type": "path",
"properties": {
"enter": {
"x": {"value": 200},
"y": {"value": 40},
"path": {"value": "m-5.5,-10l0,20l11.5,-10l-11.5,-10z"},
"stroke": {"value": "#880"},
"strokeWidth": {"value": 2.5}
},
"update": {"fill": {"value": "#fff"}},
"hover": {"fill": {"value": "#f00"}}
}
}
]
}
</graph>


== Test 2 ==

{{Graph:Chart|width=30|height=30|type=pie|legend=Wahlbeteiligung|x=Wähler, Nichtwähler|y1=32.7, 67.3}}

== Test 3 ==

{{Template:Graph:Chart|width=400|height=100|xAxisTitle=X|yAxisTitle=Y|type=rect|x=1,2,3,4,5,6,7,8|y=10,12,6,14,2,10,7,9}}

== Test 4 ==


<graph mode=interactive title="Historical Fertility Rates">
{
"version": 2,
"width": 500,
"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": [
{
"name": "highlights",
"url": "wikiraw:///Extension:Graph/Demo/RawData:FertilityByCountryHistoric-csv",
"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": [
{
"name": "yearsScale",
"type": "linear",
"zero": false,
"domain": [1960,2013],
"range": "width"
},
{
"name": "color",
"type": "linear",
"domain": {"data": "countries","field": "zipped.v"},
"domainMin": 1,
"zero": false,
"range": ["#FFEDBC", "#f83600"]
}
],
"marks": [
{
"name": "yearLabel",
"type": "text",
"properties": {
"enter": {
"x": {"value": 0},
"y": {"value": 25},
"fontSize": {"value": 32},
"fontWeight": {"value": "bold"},
"fill": {"value": "steelblue"}
},
"update": {"text": {"signal": "currentYear"}}
}
},
{
"name": "scrollLine",
"type": "rule",
"properties": {
"enter": {
"x": {"value": 0},
"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":{
"rule": [
{
"predicate": {
"name": "isNotNull",
"id": {"field": "zipped.v"}
},
"scale": "color",
"field": "zipped.v"
},
{"value": "grey"}
]
}
},
"hover": {"fill": {"value": "#989898"}}
}
}
],
"predicates": [
{
"name": "isNotNull",
"type": "!=",
"operands": [{"value": null}, {"arg": "id"}]
}
]
}
</graph>
WLM
2.350

Bearbeitungen

Navigationsmenü