Format: Covid/Med/Echipament/Graf: Diferență între versiuni

De la alegeri.md
Salt la: navigare, căutare
(1)
(1)
Linia 3: Linia 3:
 
<graph>
 
<graph>
 
{
 
{
  "version": 2,
+
"version":2,
"width": 885,
+
"width":885,
// "viewport": [945,230],
+
"height":350,
// "padding": 5,
+
// "viewport":[945,230],
"padding": {"top": 25, "left": 43, "bottom": 35, "right": 16},
+
// "padding":{"top": 25, "left": 43, "bottom": 35, "right": 16},
  "height": 350,
+
"padding":"auto",
//   "padding": "auto",
+
"data": [
  "data": [
 
 
    {
 
    {
      "name": "table",
+
      "name":"table",
 
      "values": [
 
      "values": [
        {"year": 2005,"population": 6, "photo" : 16 },
+
        {"data":2005, "masti":6, "manusi":16 },
        {"year": 2006,"population": 15, "photo" : 17},
+
        {"data":2006, "masti":15, "manusi":17},
        {"year": 2007,"population": 16, "photo" : 21},
+
        {"data":2007, "masti":16, "manusi":21},
        {"year": 2008,"population": 22, "photo" : 28},
+
        {"data":2008, "masti":22, "manusi":28},
        {"year": 2009,"population": 19, "photo" : 25},
+
        {"data":2009, "masti":19, "manusi":25},
        {"year": 2010,"population": 25, "photo" : 50},
+
        {"data":2010, "masti":25, "manusi":50},
        {"year": 2011,"population": 18, "photo" : 33},
+
        {"data":2011, "masti":18, "manusi":33},
        {"year": 2012,"population": 22, "photo" : 67},
+
        {"data":2012, "masti":22, "manusi":67},
        {"year": 2013,"population": 34, "photo" : 174},
+
        {"data":2013, "masti":34, "manusi":174},
        {"year": 2014,"population": 17, "photo" : 183},
+
        {"data":2014, "masti":17, "manusi":183},
        {"year": 2015,"population": 22, "photo" : 206},
+
        {"data":2015, "masti":22, "manusi":206},
        {"year": 2016,"population": 30, "photo" : 338},
+
        {"data":2016, "masti":30, "manusi":338},
        {"year": 2017,"population": 31, "photo" : 1102},
+
        {"data":2017, "masti":31, "manusi":1102},
        {"year": 2018,"population": 48, "photo" : 2008},       
+
        {"data":2018, "masti":48, "manusi":2008},       
        {"year": 2019,"population": 48, "photo" : 2008},                               
+
        {"data":2019, "masti":48, "manusi":2008},                               
 
      ]
 
      ]
 
    },
 
    },
Linia 34: Linia 33:
 
      "name": "annotation",
 
      "name": "annotation",
 
      "values": [
 
      "values": [
        {"start": 2013,"end": 2014,"text": "Wiki Loves Public Art"},
+
        {"start": 2013,"end": 2014,"text": "Cod roșu"},
 
        {"start": 2016,"end": 2019,"text": "Public art project"}
 
        {"start": 2016,"end": 2019,"text": "Public art project"}
 
      ]
 
      ]
Linia 45: Linia 44:
 
      "range": "width",
 
      "range": "width",
 
      "zero": false,
 
      "zero": false,
      "domain": {"data": "table","field": "year"}
+
      "domain": {"data": "table","field": "data"}
 
    },
 
    },
 
    {
 
    {
Linia 52: Linia 51:
 
      "range": "height",
 
      "range": "height",
 
      "nice": true,
 
      "nice": true,
      "domain": {"data": "table","field": "population"}
+
      "domain": {"data": "table","field": "masti"}
 
    },
 
    },
 
    {
 
    {
Linia 59: Linia 58:
 
      "range": "height",
 
      "range": "height",
 
      "nice": true,
 
      "nice": true,
      "domain": {"data": "table","field": "photo"}
+
      "domain": {"data": "table","field": "manusi"}
 
    },
 
    },
 
    {
 
    {
Linia 73: Linia 72:
 
      "scale": "x",
 
      "scale": "x",
 
      "format": "d",
 
      "format": "d",
      "title": "Year",
+
      "title": "Data",
 
      "ticks": 15
 
      "ticks": 15
 
    },
 
    },
Linia 112: Linia 111:
 
        "enter": {
 
        "enter": {
 
          "interpolate": {"value": "monotone"},
 
          "interpolate": {"value": "monotone"},
          "x": {"scale": "x","field": "year"},
+
          "x": {"scale": "x","field": "data"},
          "y": {"scale": "y","field": "population"},
+
          "y": {"scale": "y","field": "masti"},
 
          "stroke": {"value": "steelblue"},
 
          "stroke": {"value": "steelblue"},
 
          "strokeWidth": {"value": 3},
 
          "strokeWidth": {"value": 3},
Linia 126: Linia 125:
 
        "enter": {
 
        "enter": {
 
          "interpolate": {"value": "monotone"},
 
          "interpolate": {"value": "monotone"},
          "x": {"scale": "x","field": "year"},
+
          "x": {"scale": "x","field": "data"},
          "y": {"scale": "y","field": "photo"},
+
          "y": {"scale": "y","field": "manusi"},
 
          "stroke": {"value": "red"},
 
          "stroke": {"value": "red"},
 
          "strokeWidth": {"value": 3},
 
          "strokeWidth": {"value": 3},
Linia 139: Linia 138:
 
      "properties": {
 
      "properties": {
 
        "enter": {
 
        "enter": {
          "x": {"scale": "x","field": "year"},
+
          "x": {"scale": "x","field": "data"},
          "y": {"scale": "y","field": "population"},
+
          "y": {"scale": "y","field": "masti"},
 
          "stroke": {"value": "steelblue"},
 
          "stroke": {"value": "steelblue"},
 
          "fill": {"value": "white"},
 
          "fill": {"value": "white"},
Linia 154: Linia 153:
 
          {
 
          {
 
            "type": "aggregate",
 
            "type": "aggregate",
            "summarize": {"year": ["min","max"]}
+
            "summarize": {"data": ["min","max"]}
 
          }
 
          }
 
        ]
 
        ]
Linia 163: Linia 162:
 
          "y": {"value": -10},
 
          "y": {"value": -10},
 
          "text": {
 
          "text": {
            "template": "Population of Falkensee from \u007b{datum.min_year}\u007d to \u007b{datum.max_year}\u007d"
+
            "template": "Distribuția echipamentelor de protecție în perioada \u007b{datum.min_data}\u007d \u007b{datum.max_data}\u007d"
 
          },
 
          },
 
          "fill": {"value": "black"},
 
          "fill": {"value": "black"},

Versiunea de la data 7 august 2020 12:15

1

2