control over font sizes

main
Martin Putzlocher 2023-02-03 09:40:51 +01:00
parent b4dca4ed9d
commit 50b098d606
1 changed files with 18 additions and 3 deletions

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>