我'm want to resize tooltips on chart. I'已使用全局设置但不起作用 . 我的图表上的工具提示太小了 . 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
}
});
});
2 回答
您也可以更改 Headers 字体大小 .