mirror of
https://github.com/olehomelchenko/minivlat-local-ua.git
synced 2025-12-21 13:12:23 +00:00
54 lines
1.4 KiB
JSON
54 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
|
|
"title": {
|
|
"text": "Global Smartphone Market Share in 2021",
|
|
"fontSize": 16,
|
|
"fontWeight": "bold"
|
|
},
|
|
"config": {
|
|
"legend": {
|
|
"labelFontSize": 11,
|
|
"titleFontSize": 12,
|
|
"titleFontWeight": "bold"
|
|
}
|
|
},
|
|
"width": 600, "height": 400,
|
|
"data": {
|
|
"values": [
|
|
{"index": 1, "brand": "Samsung", "share": 17.6},
|
|
{"index": 2, "brand": "Xiaomi", "share": 15.5},
|
|
{"index": 3, "brand": "Apple", "share": 15.0},
|
|
{"index": 4, "brand": "Oppo", "share": 10.2},
|
|
{"index": 5, "brand": "Vivo", "share": 9.8},
|
|
{"index": 6, "brand": "Others", "share": 31.9}
|
|
]
|
|
},
|
|
"encoding": {
|
|
"theta": {
|
|
"field": "share",
|
|
"type": "quantitative",
|
|
"stack": true,
|
|
"sort": {"field": "index", "order": "ascending"}
|
|
},
|
|
"color": {
|
|
"field": "brand",
|
|
"type": "nominal",
|
|
"legend": null,
|
|
"sort": {"field": "index", "order": "ascending"}
|
|
},
|
|
"order": {
|
|
"field": "index",
|
|
"type": "quantitative"
|
|
}
|
|
},
|
|
"layer": [{
|
|
"mark": {"type": "arc", "outerRadius": 120}
|
|
}, {
|
|
"mark": {"type": "text", "radius": 90},
|
|
"encoding": {
|
|
"text": {"field": "brand", "type": "nominal"},
|
|
"color": {"value": "black"}
|
|
}
|
|
}]
|
|
}
|