Add tooltips to dognuth charts

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2017-09-20 22:28:46 +02:00
parent e7fc65b684
commit aef4159f44
+26
View File
@@ -806,6 +806,19 @@ $(document).ready(function() {
display: true,
position: "right"
},
tooltips: {
enabled: true,
callbacks: {
title: function(tooltipItem, data) {
return "Query types";
},
label: function(tooltipItems, data) {
var dataset = data.datasets[tooltipItems.datasetIndex];
var label = data.labels[tooltipItems.index];
return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%";
}
}
},
animation: {
duration: 2000
},
@@ -831,6 +844,19 @@ $(document).ready(function() {
display: true,
position: "right"
},
tooltips: {
enabled: true,
callbacks: {
title: function(tooltipItem, data) {
return "Forward destinations";
},
label: function(tooltipItems, data) {
var dataset = data.datasets[tooltipItems.datasetIndex];
var label = data.labels[tooltipItems.index];
return label + ": " + dataset.data[tooltipItems.index].toFixed(1) + "%";
}
}
},
animation: {
duration: 2000
},