Vorlage:Graph:Spielleiter: 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": 50, "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": | + | "values": {{Data:Folgen}}, |
| − | + | "transform": [ | |
| − | + | { | |
| − | + | "type": "aggregate", | |
| − | + | "groupby": ["SpielleiterIn"], | |
| − | "transform": [{ | + | "summarize": [{ |
| − | "type": " | + | "field": "*", |
| − | " | + | "ops": ["count"], |
| − | " | + | "as": ["Anzahl"] |
| − | + | }] | |
| − | + | } | |
| − | + | ] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
], | ], | ||
| Zeile 39: | Zeile 49: | ||
"type": "ordinal", | "type": "ordinal", | ||
"range": "width", | "range": "width", | ||
| − | "domain": {"data": "table", "field": " | + | "domain": {"data": "table", "field": "SpielleiterIn"}, |
| + | "points": false, | ||
| + | "padding": 0.5, | ||
}, | }, | ||
{ | { | ||
| Zeile 45: | Zeile 57: | ||
"type": "linear", | "type": "linear", | ||
"range": "height", | "range": "height", | ||
| − | "domain": {"data": "table", "field": " | + | "domain": {"data": "table", "field": "Anzahl"}, |
"nice": true | "nice": true | ||
| + | }, | ||
| + | { | ||
| + | "name": "sub", | ||
| + | "type": "ordinal", | ||
| + | "range": "width", | ||
| + | "domain": {"data": "sub", "field": "Stand"} | ||
} | } | ||
], | ], | ||
| Zeile 53: | Zeile 71: | ||
"type": "x", | "type": "x", | ||
"scale": "x", | "scale": "x", | ||
| − | "properties": {"labels": {"fontSize": {"value": 14} } }, | + | "title": "", |
| − | + | "tickSize": 0, | |
| + | "properties": { | ||
| + | "labels": {"fontSize": {"value": {{{fontSize|14}}} } }, | ||
| + | "title": {"fontSize": {"value": {{{fontSize|14}}} } } | ||
| + | } | ||
}, | }, | ||
{ | { | ||
"type": "y", | "type": "y", | ||
"scale": "y", | "scale": "y", | ||
| − | "title": " | + | "title": "Anzahl", |
| + | "ticks": {{{ticksY|5}}}, | ||
| + | "properties": { | ||
| + | "labels": { | ||
| + | "fontSize": {"value": {{{fontSize|14}}} } | ||
| + | }, | ||
| + | "title": {"fontSize": {"value": {{{fontSize|14}}} } } | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | "type": "x", | ||
| + | "scale": "sub", | ||
| + | "tickSize": 0, | ||
"properties": { | "properties": { | ||
"labels": { | "labels": { | ||
| − | "text": {"template": " | + | "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": 2} | ||
}, | }, | ||
| − | " | + | "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": 2}, | ||
| + | }, | ||
| + | "axis": { | ||
| + | "strokeOpacity": {"value": 0} | ||
| + | } | ||
} | } | ||
} | } | ||
| Zeile 75: | Zeile 129: | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
| − | "x": {"scale": "x", "field": " | + | "x": {"scale": "x", "field": "SpielleiterIn"}, |
| − | "width": {"scale": "x", "band": true | + | "width": {"scale": "x", "band": true}, |
| − | "y": {"scale": "y","field": " | + | "y": {"scale": "y","field": "Anzahl"}, |
"y2": {"scale": "y","value": 0}, | "y2": {"scale": "y","value": 0}, | ||
"stroke": {"value": "black"}, | "stroke": {"value": "black"}, | ||
"strokeWidth": {"value": 1.5}, | "strokeWidth": {"value": 1.5}, | ||
| − | "strokeOpacity": | + | "strokeOpacity": 1 |
| − | + | }, | |
| − | + | "update": { | |
| − | + | "fill": {"value": "#00B7EB"}, | |
}, | }, | ||
"hover": { | "hover": { | ||
"fill": {"value": "#00FFFF"}, | "fill": {"value": "#00FFFF"}, | ||
| − | |||
| − | |||
| − | |||
} | } | ||
} | } | ||
| Zeile 96: | Zeile 147: | ||
{ | { | ||
"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": "SpielleiterIn"}, | |
| − | |||
| − | "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:49 Uhr
Die Statistik der Spielleiter mit dem entsprechenden Anteil geleiteter Folgen. Die zugrunde liegenden Daten können in der Daten-Vorlage angepasst werden