control over font sizes

This commit is contained in:
Martin Putzlocher 2023-02-03 09:40:51 +01:00
parent b4dca4ed9d
commit 50b098d606

View File

@ -171,6 +171,7 @@
<canvas id="chartId" aria-label="chart" height="500" width="700"></canvas>
<script>
Chart.defaults.font.size = 20;
var chrt = document.getElementById("chartId").getContext("2d");
var chartId = new Chart(chrt, {
type: 'radar',
@ -193,8 +194,15 @@
display: true
},
min: 0,
max: 5
},
max: 5,
ticks: {
// forces step size to be 50 units
stepSize: 1,
font: {
size: 20
}
}
}
},
responsive: false,
elements: {
@ -203,7 +211,14 @@
}
}
},
plugins: []
plugins: {
legend: {
labels: {
// This more specific font property overrides the global property
fontSize: 20
}
}
}
});
</script>