Ich möchte Tooltips in Diagrammgröße ändern. Ich habe globale Einstellungen verwendet, funktioniert aber nicht. Tooltips in meinen Charts sind zu klein. Here is the viewChart.js Donut-Diagramm Tooltip Größe?
$(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
}
});
});
Sie sehen könnten [Chart JS benutzerdefinierte Tooltip Option] (http://stackoverflow.com/a/39204408/2026740) –
Works, danke! in Optionen verwenden nur Tooltips: { bodyFontSize: 25 } – Zomfire
Sollte sein: Chart.defaults.global.tooltips.titleFontSize = 16; Sie haben die .tooltips vergessen :) –