Format: Parlament/Deputati/All/Graf: Diferență între versiuni
De la alegeri.md
Oleg (Discuție | contribuții) |
Oleg (Discuție | contribuții) |
||
Linia 1: | Linia 1: | ||
+ | <div class="hidden-xs hidden-sm"> | ||
<graph>{ | <graph>{ | ||
"version":2, | "version":2, | ||
Linia 142: | Linia 143: | ||
] | ] | ||
}</graph> | }</graph> | ||
+ | </div> | ||
+ | <div class="hidden-md hidden-lg"> | ||
+ | <graph>{ | ||
+ | "version":2, | ||
+ | "description":"Deputații Parlamentului Republicii Moldova", | ||
+ | "height":200, | ||
+ | "width":380, | ||
+ | // | ||
+ | "data": [ | ||
+ | { | ||
+ | "name":"table", | ||
+ | "values": [ | ||
+ | {"year":"0", "barbati":126, "femei":5, "yeart":"1994"}, | ||
+ | {"year":"1", "barbati":109, "femei":9}, | ||
+ | {"year":"2", "barbati":111, "femei":16}, | ||
+ | {"year":"3", "barbati":94, "femei":26}, | ||
+ | {"year":"4", "barbati":77, "femei":24}, | ||
+ | {"year":"5", "barbati":90, "femei":27}, | ||
+ | {"year":"6", "barbati":106, "femei":23}, | ||
+ | {"year":"7", "barbati":114, "femei":34}, | ||
+ | {"year":"8", "barbati":88, "femei":30}, | ||
+ | {"year":"9", "barbati":66, "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", "offset":-14}, | ||
+ | "y": {"value": 218}, | ||
+ | "fill": {"value":"#666"}, | ||
+ | "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":"linear"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "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} | ||
+ | }, | ||
+ | //"update": {"fill": {"value":"white"}}, | ||
+ | //"hover": {"fill": {"value":"#4f81bd"}}, | ||
+ | |||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"line", | ||
+ | "from": {"data":"table"}, | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"scale":"x", "field":"year", "offset":0}, | ||
+ | "y": {"scale":"y", "field":"femei"}, | ||
+ | "stroke": {"value":"#fb90e0"}, | ||
+ | "strokeWidth": {"value":2}, | ||
+ | "interpolate": {"value":"linear"} | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "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} | ||
+ | }, | ||
+ | //"update": {"fill": {"value":"white"}}, | ||
+ | //"hover": {"fill": {"value":"#fb90e0"}}, | ||
+ | |||
+ | } | ||
+ | }, | ||
+ | { | ||
+ | "type":"text", | ||
+ | "properties": { | ||
+ | "enter": { | ||
+ | "x": {"signal":"width", "mult":0.5}, | ||
+ | "y": {"value":-10}, | ||
+ | "text": {"template":"Deputații Parlamentului Republicii Moldova"}, | ||
+ | "fill": {"value":"#336"}, | ||
+ | "fontSize": {"value":15}, | ||
+ | "align": {"value":"center"}, | ||
+ | "fontWeight": {"value":"bold"} | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | ] | ||
+ | }</graph> | ||
+ | </div> |