i'm want to resize tooltips on chart. I've used global settings but doesn't work. Tooltips on my charts are too small. Here is the view
$(document).ready(function () {
// Chart options
Chart.defaults.global.legend.display = false;
Chart.defaults.global.titleFontSize = 20;
var ctx = document.getElementById("Chart1");
var myChart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: [
"Produkty",
""
],
datasets: [
{
data: <?=json_encode(array_values($values));?>,
backgroundColor: [
"#2ecc71",
"#3498db"
],
hoverBackgroundColor: [
"#27ae60",
"#2980b9"
]
}]
},
options: {
cutoutPercentage: 80
}
});
});
You can change the title font size too.
options: {
tooltips: {
titleFontSize: 10,
bodyFontSize: 10
}
}
options: {
tooltips: { bodyFontSize: 20 }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With