Skip to content

Commit

Permalink
Review comments, documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Sep 18, 2019
1 parent c32fa33 commit 8e3645a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/charts/line.md
Expand Up @@ -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) | <code>boolean&#124;string</code> | 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)'`
Expand Down
7 changes: 6 additions & 1 deletion src/controllers/controller.line.js
Expand Up @@ -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;
Expand All @@ -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);
},
});

0 comments on commit 8e3645a

Please sign in to comment.