mirror of
https://github.com/olehomelchenko/minivlat-local-ua.git
synced 2025-12-21 21:22:24 +00:00
reorganize files
This commit is contained in:
53
public/charts/piechart-original.vl.json
Normal file
53
public/charts/piechart-original.vl.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"$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"}
|
||||
}
|
||||
}]
|
||||
}
|
||||
Reference in New Issue
Block a user