Format: Parlament/Deputati/All/Graf: Diferență între versiuni
De la alegeri.md
Oleg (Discuție | contribuții) |
Oleg (Discuție | contribuții) |
||
(Nu s-au afișat 12 versiuni intermediare efectuate de același utilizator) | |||
Linia 1: | Linia 1: | ||
+ | <div class="hidden-xs hidden-sm"> | ||
<graph>{ | <graph>{ | ||
"version":2, | "version":2, | ||
Linia 18: | Linia 19: | ||
{"year":"7", "barbati":114, "femei":34, "yeart":"2014"}, | {"year":"7", "barbati":114, "femei":34, "yeart":"2014"}, | ||
{"year":"8", "barbati":88, "femei":30, "yeart":"2019"}, | {"year":"8", "barbati":88, "femei":30, "yeart":"2019"}, | ||
− | {"year":"9", "barbati": | + | {"year":"9", "barbati":71, "femei":43, "yeart":"2021"}, |
] | ] | ||
}, | }, | ||
Linia 55: | Linia 56: | ||
// | // | ||
"marks": [ | "marks": [ | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year"}, | ||
+ | "y": {"scale":"y", "field":"barbati", "offset":-7}, | ||
+ | "align": {"value": "center"}, | ||
+ | "fill": {"value":"#4f81bd"}, | ||
+ | "text": {"field":"barbati"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year"}, | ||
+ | "y": {"scale":"y", "field":"femei", "offset":-7}, | ||
+ | "align": {"value": "center"}, | ||
+ | "fill": {"value":"#fb90e0"}, | ||
+ | "text": {"field":"femei"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
{ | { | ||
"type": "text", | "type": "text", | ||
Linia 62: | Linia 91: | ||
"x": {"scale":"x", "field":"year", "offset":-14}, | "x": {"scale":"x", "field":"year", "offset":-14}, | ||
"y": {"value": 218}, | "y": {"value": 218}, | ||
− | "fill": {"value":"# | + | "fill": {"value":"#999"}, |
"text": {"field":"yeart"}, | "text": {"field":"yeart"}, | ||
"fontSize": {"value":12} | "fontSize": {"value":12} | ||
Linia 77: | Linia 106: | ||
"stroke": {"value":"#4f81bd"}, | "stroke": {"value":"#4f81bd"}, | ||
"strokeWidth": {"value":2}, | "strokeWidth": {"value":2}, | ||
− | "interpolate": {"value":" | + | "interpolate": {"value":"monotone"} |
} | } | ||
} | } | ||
Linia 106: | Linia 135: | ||
"stroke": {"value":"#fb90e0"}, | "stroke": {"value":"#fb90e0"}, | ||
"strokeWidth": {"value":2}, | "strokeWidth": {"value":2}, | ||
− | "interpolate": {"value":" | + | "interpolate": {"value":"monotone"} |
} | } | ||
} | } | ||
Linia 124: | Linia 153: | ||
"hover": {"fill": {"value":"#fb90e0"}}, | "hover": {"fill": {"value":"#fb90e0"}}, | ||
+ | } | ||
+ | }, | ||
+ | ] | ||
+ | }</graph> | ||
+ | </div> | ||
+ | <div class="hidden-md hidden-lg"> | ||
+ | <graph>{ | ||
+ | "version":2, | ||
+ | "description":"Deputații Parlamentului Republicii Moldova", | ||
+ | "height":200, | ||
+ | "width":350, | ||
+ | // | ||
+ | "data": [ | ||
+ | { | ||
+ | "name":"table", | ||
+ | "values": [ | ||
+ | {"year":"0", "barbati":126, "femei":5, "yeart":"1994"}, | ||
+ | {"year":"1", "barbati":109, "femei":9}, | ||
+ | {"year":"2", "barbati":111, "femei":16, "yeart":"2001"}, | ||
+ | {"year":"3", "barbati":94, "femei":26}, | ||
+ | {"year":"4", "barbati":77, "femei":24, "yeart":"2009"}, | ||
+ | {"year":"5", "barbati":90, "femei":27}, | ||
+ | {"year":"6", "barbati":106, "femei":23, "yeart":"2010"}, | ||
+ | {"year":"7", "barbati":114, "femei":34}, | ||
+ | {"year":"8", "barbati":88, "femei":30}, | ||
+ | {"year":"9", "barbati":71, "femei":43, "yeart":"2021"}, | ||
+ | ] | ||
+ | }, | ||
+ | ], | ||
+ | // | ||
+ | "scales": [ | ||
+ | { | ||
+ | "name":"x", | ||
+ | "type":"linear", | ||
+ | "range":"width", | ||
+ | //"padding":0.74, | ||
+ | // "round":true, | ||
+ | "domain": {"data":"table", "field":"year"} | ||
+ | }, | ||
+ | { | ||
+ | "name":"y", | ||
+ | "type":"linear", | ||
+ | "range":"height", | ||
+ | "nice":true, | ||
+ | "domain": {"data":"table", "field":"barbati"} | ||
+ | } | ||
+ | ], | ||
+ | // | ||
+ | "axes": [ | ||
+ | { | ||
+ | "type":"x", "tickSizeEnd":0, | ||
+ | "scale":"x", | ||
+ | "properties": | ||
+ | { | ||
+ | "ticks": {"stroke": {"value":"#aaa"}}, | ||
+ | "labels": {"fill": {"value":"#fff"}, "fontSize": {"value":1}}, | ||
+ | "axis": {"stroke": {"value":"#ccc"}} | ||
+ | } | ||
+ | } | ||
+ | ], | ||
+ | // | ||
+ | "marks": [ | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year"}, | ||
+ | "y": {"scale":"y", "field":"barbati", "offset":-7}, | ||
+ | "align": {"value": "center"}, | ||
+ | "fill": {"value":"#4f81bd"}, | ||
+ | "text": {"field":"barbati"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year"}, | ||
+ | "y": {"scale":"y", "field":"femei", "offset":-7}, | ||
+ | "align": {"value": "center"}, | ||
+ | "fill": {"value":"#fb90e0"}, | ||
+ | "text": {"field":"femei"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type": "text", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year", "offset":-14}, | ||
+ | "y": {"value": 218}, | ||
+ | "fill": {"value":"#999"}, | ||
+ | "text": {"field":"yeart"}, | ||
+ | "fontSize": {"value":12} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year", "offset":0}, | ||
+ | "y": {"scale":"y", "field":"barbati"}, | ||
+ | "stroke": {"value":"#4f81bd"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"monotone"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"symbol", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year", "offset":0}, | ||
+ | "y": {"scale":"y", "field":"barbati"}, | ||
+ | "stroke": {"value":"#4f81bd"}, | ||
+ | "fill": {"value":"white"}, | ||
+ | "size": {"value":20} | ||
+ | }, | ||
} | } | ||
}, | }, | ||
{ | { | ||
− | "type":" | + | "type":"line", |
+ | "from": {"data":"table"}, | ||
"properties": { | "properties": { | ||
"enter": { | "enter": { | ||
− | "x": {" | + | "x": {"scale":"x", "field":"year", "offset":0}, |
− | + | "y": {"scale":"y", "field":"femei"}, | |
− | " | + | "stroke": {"value":"#fb90e0"}, |
− | + | "strokeWidth": {"value":2}, | |
− | " | + | "interpolate": {"value":"monotone"} |
− | " | ||
− | " | ||
} | } | ||
} | } | ||
− | } | + | }, |
+ | { | ||
+ | "type":"symbol", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year", "offset":0}, | ||
+ | "y": {"scale":"y", "field":"femei"}, | ||
+ | "stroke": {"value":"#fb90e0"}, | ||
+ | "fill": {"value":"white"}, | ||
+ | "size": {"value":20} | ||
+ | }, | ||
+ | } | ||
+ | }, | ||
] | ] | ||
}</graph> | }</graph> | ||
+ | </div> |