From ffa2870b562a33abdad591e06f5d3f9de144e0b2 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Mon, 7 Dec 2015 18:23:51 -0500 Subject: [PATCH] Fix a few more issues in the tooltips --- src/core/core.tooltip.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 97a9e7792..cbc3111b0 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -231,7 +231,7 @@ var tooltipItems = []; - if (this._options.tooltips.mode == 'single') { + if (this._options.tooltips.mode === 'single') { var yScale = element._yScale || element._scale; // handle radar || polarArea charts tooltipItems.push({ xLabel: element._xScale ? element._xScale.getLabelForIndex(element._index, element._datasetIndex) : '', @@ -337,7 +337,7 @@ }); helpers.each(vm.body, function(line) { ctx.font = helpers.fontString(vm.bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily); - tooltipWidth = Math.max(tooltipWidth, ctx.measureText(line).width + (this._options.tooltips.mode != 'single' ? (vm.bodyFontSize + 2) : 0)); + tooltipWidth = Math.max(tooltipWidth, ctx.measureText(line).width + (this._options.tooltips.mode !== 'single' ? (vm.bodyFontSize + 2) : 0)); }, this); helpers.each(vm.footer, function(line) { ctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily); @@ -452,7 +452,7 @@ // Before Body helpers.each(vm.beforeBody, function(beforeBody) { - ctx.fillText(vm.beforeBody, xBase, yBase); + ctx.fillText(beforeBody, xBase, yBase); yBase += vm.bodyFontSize + vm.bodySpacing; }); @@ -485,7 +485,7 @@ // After Body helpers.each(vm.afterBody, function(afterBody) { - ctx.fillText(vm.afterBody, xBase, yBase); + ctx.fillText(afterBody, xBase, yBase); yBase += vm.bodyFontSize; }); -- 2.47.2