Format: Ro/2: Diferență între versiuni
De la alegeri.md
Oleg (Discuție | contribuții) |
Oleg (Discuție | contribuții) |
||
Linia 1: | Linia 1: | ||
+ | <graph> | ||
+ | { | ||
+ | "version":2, | ||
+ | "width":565, | ||
+ | "height":350, | ||
+ | "data": [ | ||
+ | { | ||
+ | "name":"table", | ||
+ | {{Covid/Med/Echipament/Graf/Data}} | ||
+ | }, | ||
+ | { | ||
+ | "name":"annotation", | ||
+ | "values": [ | ||
+ | {"start":"14", "end":"74", "text":"Stare de urgență "}, | ||
+ | ] | ||
+ | }, | ||
+ | { | ||
+ | "name": "visdates", | ||
+ | "values": [ | ||
+ | {"name":"3 martie", "pos":"0"}, | ||
+ | {"name":"17 martie", "pos":"10"}, | ||
+ | {"name":"15 mai", "pos":"70"}, | ||
+ | {"name":"4 august", "pos":"146"} | ||
+ | ] | ||
+ | } | ||
+ | ], | ||
+ | // | ||
+ | "scales": [ | ||
+ | { | ||
+ | "name":"x", | ||
+ | "type":"linear", | ||
+ | "range":"width", | ||
+ | "domain": {"data":"table", "field":"mdata"} | ||
+ | }, | ||
+ | { | ||
+ | "name":"y", | ||
+ | "type":"linear", | ||
+ | "range":"height", | ||
+ | "domain": {"data":"table", "field":"masti"} | ||
+ | }, | ||
+ | { | ||
+ | "name":"color", | ||
+ | "type":"ordinal", | ||
+ | "domain": {"data":"annotation", "field":"text"}, | ||
+ | "range": ["#c00"] | ||
+ | }, | ||
+ | ], | ||
+ | // | ||
+ | "axes": [ | ||
+ | { | ||
+ | "type":"x", | ||
+ | "scale":"x", | ||
+ | //"tickSize": 5, | ||
+ | "values": [21, 22, 24, 27, 28, 29, 30, 34, 36, 37, 38, 41, 42, 44, 49, 50, 51, 55, 56, 57, 58, 65, 66, 69, 70, 76, 79, 84, 91, 94, 98, 100, 107, 108, 112, 118, 119, 123, 127, 133, 140, 146, 148], | ||
+ | "properties": | ||
+ | { | ||
+ | "ticks": {"stroke": {"value":"#aaa"}}, | ||
+ | "labels": {"fill": {"value":"#fff"}, "fontSize": {"value":1}}, | ||
+ | "axis": {"stroke": {"value":"#ccc"}}, | ||
+ | }, | ||
+ | }, | ||
+ | { | ||
+ | "type":"y", | ||
+ | "scale":"y", | ||
+ | //"format":"s", | ||
+ | "grid":true, | ||
+ | "layer":"front", | ||
+ | "properties": | ||
+ | { | ||
+ | "ticks": {"stroke": {"value":"#d9d9d9"}}, | ||
+ | "labels": {"fill": {"value":"#666"}, "fontSize": {"value":12}}, | ||
+ | "axis": {"stroke": {"value":"#ccc"}}, | ||
+ | "grid": {"stroke": {"value":"#999"}, "strokeWidth": {"value":1}}, | ||
+ | } | ||
+ | }, | ||
+ | ], | ||
+ | // | ||
+ | "marks": [ | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"visdates"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"pos"}, | ||
+ | "y": {"value": 368}, | ||
+ | "fill": {"value":"#666"}, | ||
+ | "text": {"field":"name"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"rect", | ||
+ | "from": {"data":"annotation"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"start"}, | ||
+ | "y": {"value":0}, | ||
+ | "x2": {"scale":"x", "field":"end"}, | ||
+ | "y2": {"signal":"height"}, | ||
+ | "fill": {"scale":"color", "field":"text"}, | ||
+ | "opacity": {"value":0.1} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"mdata"}, | ||
+ | "y": {"scale":"y", "field":"manusi"}, | ||
+ | "stroke": {"value":"#5b97dd"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"step-after"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"mdata"}, | ||
+ | "y": {"scale":"y", "field":"costume"}, | ||
+ | "stroke": {"value":"#26797a"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"step-after"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"mdata"}, | ||
+ | "y": {"scale":"y", "field":"viziere"}, | ||
+ | "stroke": {"value":"#999"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"step-after"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"mdata"}, | ||
+ | "y": {"scale":"y", "field":"masti"}, | ||
+ | "stroke": {"value":"#5ab8f0"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"step-after"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"text", | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"signal":"width", "mult":0.5}, | ||
+ | "y": {"value": -10}, | ||
+ | "text": {"template":"Distribuția echipamentelor de protecție individuală (3 martie – 4 august 2020)"}, | ||
+ | "fill": {"value":"#336"}, | ||
+ | "fontSize": {"value":15}, | ||
+ | "align": {"value":"center"}, | ||
+ | "fontWeight": {"value":"bold"} | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ], | ||
+ | // | ||
+ | "legends": [ | ||
+ | { | ||
+ | "fill":"color", | ||
+ | "properties": { | ||
+ | "labels": {"fontSize": {"value":12}, "fill": {"value":"#666"}}, | ||
+ | "symbols": { | ||
+ | "strokeWidth": {"value":0}, | ||
+ | "shape": {"value":"square"}, | ||
+ | "opacity": {"value":0} | ||
+ | }, | ||
+ | "legend": { | ||
+ | "x": {"value":180}, | ||
+ | "y": {"value":5}, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </graph> | ||
+ | |||
+ | ===2=== | ||
+ | |||
+ | |||
<graph>{ | <graph>{ | ||
"version": 2, | "version": 2, |
Versiunea de la data 10 august 2020 19:55
Eroare de sintaxă
2
text