Карта мира: различия между версиями
Перейти к навигации
Перейти к поиску
Строка 1: | Строка 1: | ||
+ | |||
− | {{GraphChart|width=400|height=100|type=line|x=1,2,3,4,5,6,7,8|y=10, 12, 6, 14, 2, 10, 7, 9}} |
||
<graph> |
<graph> |
||
{ |
{ |
||
− | + | "version": 2, |
|
− | + | "width": 100, |
|
− | + | "height": 100, |
|
− | + | "data": [ |
|
− | + | { |
|
− | + | "name": "table", |
|
+ | "values": [12,23,47,6,52,19], |
||
− | "values": [{"id":"US","v":"blue"},{"id":"AU","v":"purple"},{"id":"CN","v":"red"},{"id":"BR","v":"pink"},{"id":"DZ","v":"green"}] |
||
⚫ | |||
⚫ | |||
+ | ], |
||
⚫ | |||
⚫ | |||
⚫ | |||
+ | "type": "sqrt", |
||
+ | "domain": {"data": "table","field": "data"}, |
||
+ | "range": [20,100] |
||
⚫ | |||
+ | ], |
||
+ | "marks": [ |
||
⚫ | |||
+ | "type": "arc", |
||
+ | "from": {"data": "table"}, |
||
⚫ | |||
⚫ | |||
+ | "x": {"field": {"group": "width"},"mult": 0.5}, |
||
+ | "y": {"field": {"group": "height"},"mult": 0.5}, |
||
+ | "startAngle": {"field": "layout_start"}, |
||
+ | "endAngle": {"field": "layout_end"}, |
||
+ | "innerRadius": {"value": 20}, |
||
+ | "outerRadius": {"scale": "r","field": "data"}, |
||
⚫ | |||
}, |
}, |
||
+ | "update": {"fill": {"value": "#ccc"} }, |
||
⚫ | |||
− | + | "hover": {"fill": {"value": "pink"} } |
|
⚫ | |||
− | "url": "wikiraw:///Extension:Graph/Demo/RawData:WorldMap-iso2-json", |
||
⚫ | |||
⚫ | |||
+ | { |
||
− | "transform": [ |
||
− | + | "type": "text", |
|
− | + | "from": {"data": "table"}, |
|
− | + | "properties": { |
|
− | + | "enter": { |
|
− | + | "x": {"field": {"group": "width"},"mult": 0.5}, |
|
− | + | "y": {"field": {"group": "height"},"mult": 0.5}, |
|
− | + | "radius": {"scale": "r","field": "data","offset": 8}, |
|
− | + | "theta": {"field": "layout_mid"}, |
|
− | + | "fill": {"value": "#000"}, |
|
− | + | "align": {"value": "center"}, |
|
− | + | "baseline": {"value": "middle"}, |
|
− | + | "text": {"field": "data"} |
|
− | "as": [ "zipped" ], |
||
− | "default": { |
||
− | "v": "#C0C0C0" |
||
− | } |
||
− | } |
||
− | ] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
− | "from": { |
||
− | "data": "countries" |
||
⚫ | |||
⚫ | |||
⚫ | |||
− | "path": { |
||
− | "field": "layout_path" |
||
− | } |
||
− | }, |
||
− | "update": { |
||
− | "fill": { |
||
− | "field": "zipped.v" |
||
− | } |
||
− | }, |
||
− | "hover": { |
||
− | "fill": { |
||
⚫ | |||
− | } |
||
− | } |
||
⚫ | |||
} |
} |
||
− | + | } |
|
+ | } |
||
+ | ] |
||
} |
} |
||
</graph> |
</graph> |
Версия от 14:44, 7 ноября 2022