From: Evert Timberg Date: Sat, 24 Sep 2016 08:58:31 +0000 (-0400) Subject: Compute correct tooltip size when there is no title present (#3324) X-Git-Tag: v2.4.0~1^2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11e8c50f722c446b973f1cf8f412b72116ccf979;p=thirdparty%2FChart.js.git Compute correct tooltip size when there is no title present (#3324) --- diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 5edfd0075..d0068ee67 100755 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -354,7 +354,7 @@ module.exports = function(Chart) { footerFontSize = vm.footerFontSize; size.height += titleLineCount * titleFontSize; // Title Lines - size.height += (titleLineCount - 1) * vm.titleSpacing; // Title Line Spacing + size.height += titleLineCount ? (titleLineCount - 1) * vm.titleSpacing : 0; // Title Line Spacing size.height += titleLineCount ? vm.titleMarginBottom : 0; // Title's bottom Margin size.height += combinedBodyLength * bodyFontSize; // Body Lines size.height += combinedBodyLength ? (combinedBodyLength - 1) * vm.bodySpacing : 0; // Body Line Spacing