Update chart configurations to set fixed width and enhance export options in quiz

This commit is contained in:
2025-01-29 16:59:29 +02:00
parent 7cf61a1cef
commit f7a667616b
23 changed files with 32 additions and 23 deletions

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"values": [

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"values": [

View File

@@ -8,7 +8,7 @@
"data": {
"url": "data/barchart.csv", "format": {"type": "csv"}
},
"width": "container",
"width": 800,
"height": 400,
"mark": {
"type": "bar"

View File

@@ -8,7 +8,7 @@
"data": {
"url": "data/barchart.csv", "format": {"type": "csv"}
},
"width": "container",
"width": 800,
"height": 400,
"mark": {
"type": "bar"

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/bubblechart.csv"

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/bubblechart.csv"

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 500,
"projection": {
"type": "albersUsa"

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"height": 500,
"width": "container",
"width": 800,
"title": "Кількість шлюбів в першому півріччі 2024 р.",
"config": {
"padding": 0,

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/histogram.csv"

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/histogram.csv"

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": "container",
"width": 800,
"height": 400,
"title": "Oil Prices",
"data": {

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": "container",
"width": 800,
"height": 400,
"title": "Ціни на нафту",
"data": {

View File

@@ -12,7 +12,7 @@
"titleFontWeight": "bold"
}
},
"width": "container", "height": 400,
"width": 800, "height": 400,
"data": {
"values": [
{"brand": "Samsung", "share": 17.6},

View File

@@ -12,7 +12,7 @@
"titleFontWeight": "bold"
}
},
"width": "container", "height": 400,
"width": 800, "height": 400,
"data": {
"values": [
{"brand": "Samsung", "share": 17.6},

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/scatterplot.csv"

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"url": "data/scatterplot.csv"

View File

@@ -8,7 +8,7 @@
"data": {
"url": "data/stacked100.csv"
},
"width": "container",
"width": 800,
"height": 400,
"encoding": {
"y": {

View File

@@ -8,7 +8,7 @@
"data": {
"url": "data/stacked100.csv"
},
"width": "container",
"width": 800,
"height": 400,
"encoding": {
"y": {

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"values": [

View File

@@ -5,7 +5,7 @@
"fontSize": 16,
"fontWeight": "bold"
},
"width": "container",
"width": 800,
"height": 400,
"data": {
"values": [

View File

@@ -6,7 +6,7 @@
"data": {
"url": "data/stackedbarchart.csv"
},
"width": "container",
"width": 800,
"height": 400,
"encoding": {
"x": {

View File

@@ -6,7 +6,7 @@
"data": {
"url": "data/stackedbarchart.csv"
},
"width": "container",
"width": 800,
"height": 400,
"encoding": {
"x": {

View File

@@ -79,7 +79,16 @@ document.addEventListener('DOMContentLoaded', function () {
// Embed the Vega-Lite chart
const embedOptions = {
actions: false, // Disable kebab menu
downloadFileName: `${question.chart}-${version}`,
actions: {
export: {
svg: true,
png: true
},
source: false,
compiled: false,
editor: false
},
tooltip: false // Disable tooltips
};