From 7ab2a5ed9a4c2faea07ea585bd2484ec2c573493 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sun, 6 Dec 2015 09:38:19 -0500 Subject: [PATCH] Remove unused xOffset property from the tooltip. Use the multiKeyBackground. Update documentation accordingly. --- docs/00-Getting-Started.md | 3 +-- src/core/core.tooltip.js | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/00-Getting-Started.md b/docs/00-Getting-Started.md index cd0970bd4..2cbc720ab 100644 --- a/docs/00-Getting-Started.md +++ b/docs/00-Getting-Started.md @@ -127,8 +127,7 @@ xPadding | Number | 6 | Padding to add on top and bottom of tooltip yPadding | Number | 6 | Padding to add on left and right of tooltip caretSize | Number | 5 | Size, in px, of the tooltip arrow cornerRadius | Number | 6 | Radius of tooltip corner curves -xOffset | Number | 10 | -multiKeyBackground | Color | "#fff" | +multiKeyBackground | Color | "#fff" | Color to draw behind the colored boxes when multiple items are in the tooltip | | | callbacks | - | - | V2.0 introduces callback functions as a replacement for the template engine in v1. The tooltip has the following callbacks for providing text. For all functions, 'this' will be the tooltip object create from the Chart.Tooltip constructor **Callback Functions** | | | All functions are called with the same arguments diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 47f196149..78add55db 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -35,7 +35,6 @@ xPadding: 6, caretSize: 5, cornerRadius: 6, - xOffset: 10, multiKeyBackground: '#fff', callbacks: { // Args are: (tooltipItems, data) @@ -98,7 +97,6 @@ // Positioning xPadding: options.tooltips.xPadding, yPadding: options.tooltips.yPadding, - xOffset: options.tooltips.xOffset, // Body bodyColor: options.tooltips.bodyColor, @@ -467,7 +465,7 @@ // Draw Legend-like boxes if needed if (this._options.tooltips.mode != 'single') { // Fill a white rect so that colours merge nicely if the opacity is < 1 - ctx.fillStyle = helpers.color('#FFFFFF').alpha(opacity).rgbaString(); + ctx.fillStyle = helpers.color(vm.legendColorBackground).alpha(opacity).rgbaString(); ctx.fillRect(xBase, yBase, vm.bodyFontSize, vm.bodyFontSize); // Border -- 2.47.2