Карта мира: различия между версиями

Материал из wiki.energogroup.org
Перейти к навигации Перейти к поиску
Строка 1: Строка 1:
 
<graph>
 
<graph>
 
{
 
{
  +
"version": 2,
 
"name": "stats",
+
"width": 1,
"source": "table",
+
"height": 1,
"transform": [
+
"data": [
{
+
{
"type": "facet",
+
"name": "highlights",
  +
"values": [{"id":"US","v":"blue"},{"id":"AU","v":"purple"},{"id":"CN","v":"red"},{"id":"BR","v":"pink"},{"id":"DZ","v":"green"}]
"groupby": ["x"],
 
  +
},
"summarize": {"y": ["average", "sum", "min", "max"]}
 
}
+
{
  +
"name": "countries",
]
 
  +
"url": "wikiraw:///Extension:Graph/Demo/RawData:WorldMap-iso2-json",
 
  +
"format": {"type": "topojson", "feature": "countries"},
  +
"transform": [
  +
{
  +
"type": "geopath",
  +
"value": "data",
  +
"scale": 80,
  +
"translate":[0,0],
  +
"projection": "equirectangular"
  +
},
  +
{
  +
"type": "lookup",
  +
"keys": [ "id" ],
  +
"on": "highlights",
  +
"onKey": "id",
  +
"as": [ "zipped" ],
  +
"default": {
  +
"v": "#C0C0C0"
  +
}
  +
}
  +
]
  +
}
  +
],
  +
"marks": [
  +
{
  +
"type": "path",
  +
"from": {
  +
"data": "countries"
  +
},
  +
"properties": {
  +
"enter": {
  +
"path": {
  +
"field": "layout_path"
  +
}
  +
},
  +
"update": {
  +
"fill": {
  +
"field": "zipped.v"
  +
}
  +
},
  +
"hover": {
  +
"fill": {
  +
"value": "#989898"
  +
}
  +
}
  +
}
  +
}
 
]
 
}
 
}
 
</graph>
 
</graph>

Версия от 09:01, 7 ноября 2022