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

Перейти к навигации Перейти к поиску
нет описания правки
<graph>
{
"version": 2,
"width": 6001,
"height": 6001,
"paddingdata": 5,[
]{
"signals": [
{ "name": "rotationhighlights", "init": 0,
"values": [{"id":"US","v":"blue"},{"id":"AU","v":"purple"},{"id":"CN","v":"red"},{"id":"BR","v":"pink"},{"id":"DZ","v":"green"}]
"streams": [{
"type": "click"},
"expr": "rotation + 6.14/180"{
"typename": "linkpathcountries",
}]
"url": "wikiraw:///Extension:Graph/Demo/RawData:WorldMap-iso2-json",
}
"format": {"type": "filtertopojson", "testfeature": "datum.parentcountries"},
],
"datatransform": [
{
"nametype": "treegeopath",
"urlvalue": "wikiraw:///Extension:Graph/data/flare-json",
"format": { "typescale": "treejson"}80,
"transformtranslate": [0,0],
"projection": "equirectangular"
{ "type": "hierarchy", "sort": "name", "size": [6.28, 300], "orient": "radial", "output": {"x": "angle1", "y": "radius"} },
},
{ "type": "formula", "field": "angle", "expr": "(datum.angle1 + rotation) % (2*PI)" },
{
{ "type": "formula", "field": "sign", "expr": "datum.angle > 3.14 ? 1 : -1" },
"shapetype": "linelookup",
{ "type": "formula", "field": "degrees", "expr": "!datum.radius ? 0 : (datum.angle + datum.sign*1.57) * 180/PI" },
{ "type": "formula", "field": "yy", "exprkeys": [ "300 + datum.radius * cos(datum.angle)id" }],
{ "type": "formula", "field": "xx", "expron": "300 + datum.radius * -sin(datum.angle)highlights" },
"targetX": "xx", "targetYonKey": "yyid",
{ "type": "formula", "field": "align", "expr": "!datum.radius ? 'center' : datum.sign < 0 ? 'left' : 'right'" }
"as": [ "zipped" ],
]
"updatedefault": {
}
"v": "#C0C0C0"
],
}
"marks": [
{ }
"type": "path", ]
"from": {
"data": "tree",
"transform": [
{"type": "filter", "test": "datum.parent"},
{
"type": "linkpath",
"sourceX": "parent.xx", "sourceY": "parent.yy",
"targetX": "xx", "targetY": "yy",
"shape": "line"
}
]
},
"properties": {
"update": {
"path": {"field": "layout_path"},
"stroke": {"value": "#ddd"}
}
}],
},"marks": [
{
"type": "textpath",
"from": {"data": "tree"},
"propertiesdata": {"countries"
"update": { },
"xproperties": {"field": "xx"},
"y": { "fieldenter": "yy"},{
"font": { "valuepath": "Helvetica Neue"},{
"fontSizefield": {"valuelayout_path": 10},
"align": {"field": "align" },
"baseline": {"value": "middle" },
"fill": { "valueupdate": "#000"},{
"text": { "fieldfill": "name"},{
"angle": { "field": "degreeszipped.v"}
}
},
"fromhover": {
"fill": {
"stroke": { "value": "#ddd989898"}
}
}
},
}
}]
}
]
}
</graph>

Навигация