Update chart configurations for responsive design and data accuracy

This commit is contained in:
2025-01-28 04:41:04 +02:00
parent 0e6bad0933
commit a25a54b0d1
11 changed files with 62 additions and 31 deletions

View File

@@ -8,8 +8,8 @@
"data": {
"url": "data/stacked100.csv"
},
"width": 500,
"height": 300,
"width": "container",
"height": 400,
"encoding": {
"y": {
"field": "value",
@@ -49,6 +49,11 @@
"title": "Medals",
"orient": "right"
}
},
"order": {
"field": "order",
"type": "quantitative",
"sort": "ascending"
}
},
"mark": "bar",
@@ -65,9 +70,8 @@
]
},
{
"sort": [
{"field": "category", "order": "descending"}
]
"calculate": "datum.category === 'Gold' ? 1 : datum.category === 'Silver' ? 2 : 3",
"as": "order"
}
],
"config": {