From 8e3645a0dec2d58be12b29a70cacdac22c72f39a Mon Sep 17 00:00:00 2001 From: kurkle Date: Wed, 18 Sep 2019 22:39:48 +0300 Subject: [PATCH] Review comments, documentation --- docs/charts/line.md | 3 +++ src/controllers/controller.line.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/charts/line.md b/docs/charts/line.md index bd2a24c98d2..b00934555dc 100644 --- a/docs/charts/line.md +++ b/docs/charts/line.md @@ -52,6 +52,9 @@ The line chart allows a number of properties to be specified for each dataset. T | [`borderWidth`](#line-styling) | `number` | Yes | - | `3` | [`cubicInterpolationMode`](#cubicinterpolationmode) | `string` | Yes | - | `'default'` | [`fill`](#line-styling) | boolean|string | Yes | - | `true` +| [`hoverBackgroundColor`](#line-styling) | [`Color`](../general/colors.md) | Yes | - | `undefined` +| [`hoverBorderColor`](#line-styling) | [`Color`](../general/colors.md) | Yes | - | `undefined` +| [`hoverBorderWidth`](#line-styling) | `number` | Yes | - | `undefined` | [`label`](#general) | `string` | - | - | `''` | [`lineTension`](#line-styling) | `number` | - | - | `0.4` | [`pointBackgroundColor`](#point-styling) | `Color` | Yes | Yes | `'rgba(0, 0, 0, 0.1)'` diff --git a/src/controllers/controller.line.js b/src/controllers/controller.line.js index da22a705b04..42925d04bc9 100644 --- a/src/controllers/controller.line.js +++ b/src/controllers/controller.line.js @@ -316,6 +316,9 @@ module.exports = DatasetController.extend({ model.radius = valueOrDefault(options.hoverRadius, options.radius); }, + /** + * @protected + */ setDatasetHoverStyle: function() { var line = this.getMeta().dataset; var model = line._model; @@ -324,10 +327,12 @@ module.exports = DatasetController.extend({ line.$previousStyle = { backgroundColor: model.backgroundColor, - borderColor: model.borderColor + borderColor: model.borderColor, + borderWidth: model.borderWidth }; model.backgroundColor = valueOrDefault(config.hoverBackgroundColor, getHoverColor(config.backgroundColor)); model.borderColor = valueOrDefault(config.hoverBorderColor, getHoverColor(config.borderColor)); + model.borderWidth = valueOrDefault(config.hoverBorderWidth, config.borderWidth); }, });