mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
Update external tooltip docs (#8674)
This commit is contained in:
parent
180f1b941e
commit
9a0a509385
@ -314,13 +314,14 @@ var myPieChart = new Chart(ctx, {
|
||||
}
|
||||
|
||||
var position = context.chart.canvas.getBoundingClientRect();
|
||||
var bodyFont = Chart.helpers.toFont(tooltipModel.options.bodyFont);
|
||||
|
||||
// Display, position, and set styles for font
|
||||
tooltipEl.style.opacity = 1;
|
||||
tooltipEl.style.position = 'absolute';
|
||||
tooltipEl.style.left = position.left + window.pageXOffset + tooltipModel.caretX + 'px';
|
||||
tooltipEl.style.top = position.top + window.pageYOffset + tooltipModel.caretY + 'px';
|
||||
tooltipEl.style.font = tooltipModel.bodyFont.string;
|
||||
tooltipEl.style.font = bodyFont.string;
|
||||
tooltipEl.style.padding = tooltipModel.padding + 'px ' + tooltipModel.padding + 'px';
|
||||
tooltipEl.style.pointerEvents = 'none';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user