Vorlage:Graph:Wuerfelergebnisse: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Void (Diskussion | Beiträge) K (Layout angepasst) |
Void (Diskussion | Beiträge) K (Datumskonvertierung korrigiert) |
||
| (3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 8: | Zeile 8: | ||
"width": {{{width|600}}}, | "width": {{{width|600}}}, | ||
"height": {{{height|300}}}, | "height": {{{height|300}}}, | ||
| − | "padding": {"top": 20, "left": 70, "bottom": | + | "padding": {"top": 20, "left": 70, "bottom": 60, "right": 70}, |
"data": [ | "data": [ | ||
{ | { | ||
| + | "name": "sub", | ||
| + | "values": {{Data:Folgen}}, | ||
| + | "transform": [ | ||
| + | { | ||
| + | "type": "formula", | ||
| + | "field": "Datum", | ||
| + | "expr": "datetime(substring(datum.Datum,6,10), substring(datum.Datum,3,5)-1, substring(datum.Datum,0,2))" | ||
| + | }, | ||
| + | { | ||
| + | "type": "aggregate", | ||
| + | "summarize": [{ | ||
| + | "field": "Datum", | ||
| + | "ops": ["max"], | ||
| + | "as": ["Stand"] | ||
| + | }] | ||
| + | } | ||
| + | ] | ||
| + | },{ | ||
"name": "table", | "name": "table", | ||
"values": {{Data:Folgen}}, | "values": {{Data:Folgen}}, | ||
| Zeile 32: | Zeile 50: | ||
"test": "datum.Anzahl > 0" | "test": "datum.Anzahl > 0" | ||
}] | }] | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
], | ], | ||
| Zeile 57: | Zeile 65: | ||
"domain": {"data": "table", "field": "Anzahl"}, | "domain": {"data": "table", "field": "Anzahl"}, | ||
"nice": true | "nice": true | ||
| + | }, | ||
| + | { | ||
| + | "name": "sub", | ||
| + | "type": "ordinal", | ||
| + | "range": "width", | ||
| + | "domain": {"data": "sub", "field": "Stand"} | ||
} | } | ||
], | ], | ||
| Zeile 64: | Zeile 78: | ||
"scale": "x", | "scale": "x", | ||
"title": "Würfelwurf", | "title": "Würfelwurf", | ||
| + | "tickSize": 0, | ||
"properties": { | "properties": { | ||
"labels": {"fontSize": {"value": {{{fontSize|14}}} } }, | "labels": {"fontSize": {"value": {{{fontSize|14}}} } }, | ||
"title": {"fontSize": {"value": {{{fontSize|14}}} } } | "title": {"fontSize": {"value": {{{fontSize|14}}} } } | ||
| − | } | + | } |
| − | |||
}, | }, | ||
{ | { | ||
| Zeile 80: | Zeile 94: | ||
}, | }, | ||
"title": {"fontSize": {"value": {{{fontSize|14}}} } } | "title": {"fontSize": {"value": {{{fontSize|14}}} } } | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | "type": "x", | ||
| + | "scale": "sub", | ||
| + | "tickSize": 0, | ||
| + | "properties": { | ||
| + | "labels": { | ||
| + | "text": {"template": "#puertoStatistiko \u007b{datum.data{{!}}time:'%Y'}\u007d"}, | ||
| + | "fontSize": {"value": {{{fontSize|14}}} }, | ||
| + | "dx": {"value": {{{width|600}}}, "mult": -0.4}, | ||
| + | "dy": {"value": {{{fontSize|14}}}, "mult": 3} | ||
| + | }, | ||
| + | "axis": { | ||
| + | "strokeOpacity": {"value": 0} | ||
| + | } | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | "type": "x", | ||
| + | "scale": "sub", | ||
| + | "tickSize": 0, | ||
| + | "properties": { | ||
| + | "labels": { | ||
| + | "text": {"template": "Stand: \u007b{datum.data{{!}}time:'%d.%m.%Y'}\u007d"}, | ||
| + | "fontSize": {"value": {{{fontSize|14}}} }, | ||
| + | "dx": {"value": {{{width|600}}}, "mult": 0.4}, | ||
| + | "dy": {"value": {{{fontSize|14}}}, "mult": 3}, | ||
| + | }, | ||
| + | "axis": { | ||
| + | "strokeOpacity": {"value": 0} | ||
| + | } | ||
} | } | ||
} | } | ||
| Zeile 107: | Zeile 153: | ||
{ | { | ||
"type": "text", | "type": "text", | ||
| + | "from": {"data": "table"}, | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
"align": {"value": "center"}, | "align": {"value": "center"}, | ||
| − | "fill": {"value": "#333" | + | "fill": {"value": "#333"}, |
| − | + | "x": {"scale": "x", "field": "Wuerfelwurf"}, | |
| − | |||
| − | "x": {"scale": "x", " | ||
"dx": {"scale": "x", "band": true, "mult": 0.5}, | "dx": {"scale": "x", "band": true, "mult": 0.5}, | ||
| − | "y": {"scale": "y", " | + | "y": {"scale": "y", "field": "Anzahl", "offset": -5}, |
| − | "text": {" | + | "text": {"field": "Anzahl"}, |
"fontSize": {"value": {{{fontSize|14}}} }, | "fontSize": {"value": {{{fontSize|14}}} }, | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
} | } | ||
Aktuelle Version vom 15. Oktober 2017, 14:53 Uhr
Die Statistik über die Häufigkeit der unterschiedlichen Würfelergebnisse. Die zugrunde liegenden Daten können in der Daten-Vorlage angepasst werden