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

Перейти к навигации Перейти к поиску
нет описания правки
<graph>
{
"version": 2,
"width": 1600,
"height": 1600,
"datapadding": [5,
"signals": [
{
{ "name": "highlightsrotation", "init": 0,
"streams": [{
"values": [{"id":"US","v":"blue"},{"id":"AU","v":"purple"},{"id":"CN","v":"red"},{"id":"BR","v":"pink"},{"id":"DZ","v":"green"}]
}"type": "click",
{"expr": "rotation + 6.14/180"
}]
"name": "countries",
}
"url": "wikiraw:///Extension:Graph/Demo/RawData:WorldMap-iso2-json",
],
"format": {"type": "topojson", "feature": "countries"},
"transformdata": [
{
"typename": "geopathtree",
"valueurl": "wikiraw:///Extension:Graph/data/flare-json",
"format": {"scaletype": 80"treejson"},
"translatetransform": [0,0],
{ "type": "hierarchy", "sort": "name", "size": [6.28, 300], "orient": "radial", "output": {"x": "angle1", "y": "radius"} },
"projection": "equirectangular"
{ "type": "formula", "field": "angle", "expr": "(datum.angle1 + rotation) % (2*PI)" },
},
{ "type": "formula", "field": "sign", "expr": "datum.angle > 3.14 ? 1 : -1" },
{
{ "type": "formula", "field": "degrees", "expr": "!datum.radius ? 0 : (datum.angle + datum.sign*1.57) * 180/PI" },
"type": "lookup",
{ "type": "formula", "field": "yy", "keysexpr": [ "id300 + datum.radius * cos(datum.angle)" ]},
{ "type": "formula", "field": "xx", "onexpr": "highlights300 + datum.radius * -sin(datum.angle)" },
{ "type": "formula", "field": "align", "expr": "!datum.radius ? 'center' : datum.sign < 0 ? 'left' : 'right'" }
"onKey": "id",
]
"as": [ "zipped" ],
}
"default": {
],
"v": "#C0C0C0"
"marks": [
}
}{
"type": ]"path",
"from": {
"data": "tree",
"transform": [
"format": {"type": "topojsonfilter", "featuretest": "countriesdatum.parent"},
{
"nametype": "countrieslinkpath",
"sourceX": "parent.xx", "sourceY": "parent.yy",
"targetX": "xx", "onKeytargetY": "idyy",
"typeshape": "lookupline",
},
{]
},
"properties": {
"defaultupdate": {
"path": {"field": "layout_path"},
"stroke": {"value": "#989898ddd"}
}
], }
"marks": [},
{
"type": "pathtext",
"from": {"data": "tree"},
"dataproperties": "countries"{
"update": },{
"propertiesx": {"field": "xx"},
"entery": {"field": "yy"},
"font": {"pathvalue": {"Helvetica Neue"},
"fieldfontSize": {"layout_pathvalue": 10},
"align": {"field": "align"},
"baseline": {"value": "middle"},
"updatefill": {"value": "#000"},
"text": {"fillfield": {"name"},
"angle": {"field": "zipped.vdegrees"}
}
},
"hover": {
"fill": {
"value": "#989898"
}
}
}
}
] }
}
]
}
</graph>

Навигация