Disable standard tooltip, reduce font to 12px, disable auto-hide
This commit is contained in:
parent
7a7614fc22
commit
b4e0569739
|
|
@ -497,7 +497,7 @@ new Chart(ctx{{ metricName|replace({'-': '_', '.': '_'}) }}, {
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
enabled: true,
|
enabled: false,
|
||||||
mode: 'index',
|
mode: 'index',
|
||||||
intersect: false,
|
intersect: false,
|
||||||
{% set metricType = metricName %}
|
{% set metricType = metricName %}
|
||||||
|
|
@ -515,6 +515,7 @@ new Chart(ctx{{ metricName|replace({'-': '_', '.': '_'}) }}, {
|
||||||
tooltipEl.style.color = 'white';
|
tooltipEl.style.color = 'white';
|
||||||
tooltipEl.style.borderRadius = '3px';
|
tooltipEl.style.borderRadius = '3px';
|
||||||
tooltipEl.style.padding = '10px';
|
tooltipEl.style.padding = '10px';
|
||||||
|
tooltipEl.style.fontSize = '12px';
|
||||||
tooltipEl.style.pointerEvents = 'none';
|
tooltipEl.style.pointerEvents = 'none';
|
||||||
document.body.appendChild(tooltipEl);
|
document.body.appendChild(tooltipEl);
|
||||||
}
|
}
|
||||||
|
|
@ -560,9 +561,9 @@ new Chart(ctx{{ metricName|replace({'-': '_', '.': '_'}) }}, {
|
||||||
tooltipEl.style.top = position.top + window.pageYOffset + context.tooltip.caretY + 'px';
|
tooltipEl.style.top = position.top + window.pageYOffset + context.tooltip.caretY + 'px';
|
||||||
|
|
||||||
// Hide after 3 seconds
|
// Hide after 3 seconds
|
||||||
setTimeout(function() {
|
// setTimeout(function() {
|
||||||
tooltipEl.style.opacity = 0;
|
// tooltipEl.style.opacity = 0;
|
||||||
}, 3000);
|
// }, 3000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue