Format: Diaspora/Graf: Diferență între versiuni

De la alegeri.md
Salt la: navigare, căutare
(Pagină nouă: <graph>{ "version": 2, "description": "Votarea peste hotarele Republicii Moldova", "height": 200, "width": 910, // "viewport": [945,230], // "padding": 5, //"padding": {"top": 15,...)
 
Linia 3: Linia 3:
 
"description": "Votarea peste hotarele Republicii Moldova",
 
"description": "Votarea peste hotarele Republicii Moldova",
 
"height": 200,
 
"height": 200,
"width": 910,
+
"width": 800,
 
// "viewport": [945,230],
 
// "viewport": [945,230],
 
// "padding": 5,
 
// "padding": 5,
Linia 61: Linia 61:
 
"nice": true,
 
"nice": true,
 
"domain": {"data": "table", "field": "stations"}
 
"domain": {"data": "table", "field": "stations"}
 +
},
 +
{
 +
"name": "y2",
 +
"type": "linear",
 +
"range": "height",
 +
"nice": true,
 +
"domain": {"data": "table", "field": "voters"}
 
}
 
}
 
],
 
],
Linia 80: Linia 87:
 
"type": "y",
 
"type": "y",
 
"scale": "y",
 
"scale": "y",
"ticks": 5, // кол-во значений на оси y
+
"ticks": 6, // кол-во значений на оси y
 +
"orient": "right",
 +
"title": "Numărul secțiilor de votare",
 +
//"grid": true,
 +
"properties":
 +
{
 +
"ticks": {"stroke": {"value": "#d9d9d9"}},
 +
"labels": {"fill": {"value": "#666"}, "fontSize": {"value": 12}},
 +
"axis": {"stroke": {"value": "#ccc"}}
 +
}
 +
},
 +
{
 +
"type": "y",
 +
"scale": "y2",
 +
"title": "Numărul de alegători",
 
"grid": true,
 
"grid": true,
// "values": [10, 30, 50, 70, 110],
 
 
"properties":
 
"properties":
 
{
 
{
Linia 101: Linia 121:
 
"width": {"scale": "x", "band": 1, "offset": 0},
 
"width": {"scale": "x", "band": 1, "offset": 0},
 
"y": {"scale": "y", "field": "stations"},
 
"y": {"scale": "y", "field": "stations"},
"y2": {"scale": "y", "value": 0}
+
"y2": {"scale": "y", "value": 0},
 
},
 
},
 
"update": {"fill": {"value": "#ccc"}},
 
"update": {"fill": {"value": "#ccc"}},
Linia 107: Linia 127:
 
}
 
}
 
},
 
},
 +
{
 +
"type":"line",
 +
"from": {"data":"table"},
 +
"properties": {
 +
"enter": {
 +
"x": {"scale":"x", "field":"year"},
 +
"y": {"scale":"y2", "field":"voters"},
 +
"stroke": {"value":"#9bbb59"},
 +
"strokeWidth": {"value":2},
 +
//"interpolate": {"value":"step-after"}
 +
}
 +
}
 +
},
 +
    {
 +
      "type": "symbol",
 +
      "from": {"data": "table"},
 +
      "properties": {
 +
        "enter": {
 +
          "x": {"scale": "x","field": "year"},
 +
          "y": {"scale": "y2","field": "voters"},
 +
          "stroke": {"value": "#9bbb59"},
 +
          "fill": {"value": "white"},
 +
          "size": {"value": 20}
 +
        }
 +
      }
 +
    },
 
{
 
{
 
"type": "text",
 
"type": "text",
Linia 129: Linia 175:
 
]
 
]
 
}
 
}
 +
}
 +
}
 +
},
 +
{
 +
"type":"text",
 +
"properties": {
 +
"enter": {
 +
"x": {"signal":"width", "mult":0.5},
 +
"y": {"value": -10},
 +
"text": {"template":"Votarea în străinătate (1994–2019)"},
 +
"fill": {"value":"#336"},
 +
"fontSize": {"value":15},
 +
"align": {"value":"center"},
 +
"fontWeight": {"value":"bold"}
 
}
 
}
 
}
 
}

Versiunea de la data 12 august 2020 16:29