Можно ли использовать showAllTooltips: true
и mode: 'index'
?
У меня есть это:
function pintar_charts(type, type2, type3, item, titulo, titulo2, titulo3, cabeceras, data, data2, data3, color, color2, color3) {
var ctx = document.getElementById(item);
myChart = new Chart(ctx, {
type: type,
data: {
labels: cabeceras,
datasets: [{
type: 'line',
label: titulo,
lineTension: 0,
borderColor: window.chartColors.orange,
backgroundColor: window.chartColors.orange,
borderWidth: 3,
responsive: false,
data: data,
fill: false
},
{
type: 'line',
label: titulo2,
lineTension: 0,
borderColor: window.chartColors.blue,
backgroundColor: window.chartColors.blue,
borderWidth: 3,
responsive: false,
data: data2,
fill: false
},
{
type: 'line',
label: titulo3,
lineTension: 0,
borderColor: window.chartColors.green,
backgroundColor: window.chartColors.green,
borderWidth: 3,
responsive: false,
data: data3,
fill: false
}
]
},
options: {
//showAllTooltips: true,
tooltips: {
mode: 'index',
intersect: false,
callbacks: {
label: function(tooltipItem, data) {
return tooltipItem.yLabel;
},
title: function(tooltipItem, data) {
return;
}
}
}
}
});
}
Я бы хотел, чтобы все показали
