This is 1 - highlightSeriesBackgroundFade (using the old option), and hopefully more intuitive.
strokeWidth: widthNormal,
strokeBorderWidth: 2,
highlightCircleSize: widthNormal * 2,
- highlightSeriesBackgroundFade: 0.7,
+ highlightSeriesBackgroundAlpha: 0.3,
highlightSeriesOpts: {
strokeWidth: widthHighlighted,
"type": "Object",
"description": "When set, the options from this object are applied to the timeseries closest to the mouse pointer for interactive highlighting. See also 'highlightCallback'. Example: highlightSeriesOpts: { strokeWidth: 3 }."
},
- "highlightSeriesBackgroundFade": {
+ "highlightSeriesBackgroundAlpha": {
"default": "0.5",
"labels": ["Interactive Elements"],
"type": "float",
- "description": "When nonzero, dim the background while highlighting series. 0=fully visible background, 1=hiddden background (show highlighted series only)."
+ "description": "Fade the background while highlighting series. 1=fully visible background (disable fading), 0=hiddden background (show highlighted series only)."
},
"includeZero": {
"default": "false",
Dygraph.DEFAULT_ATTRS = {
highlightCircleSize: 3,
highlightSeriesOpts: null,
- highlightSeriesBackgroundFade: 0.5,
+ highlightSeriesBackgroundAlpha: 0.5,
labelsDivWidth: 250,
labelsDivStyles: {
var ctx = this.canvas_ctx_;
if (this.attr_('highlightSeriesOpts')) {
ctx.clearRect(0, 0, this.width_, this.height_);
- var alpha = this.attr_('highlightSeriesBackgroundFade');
+ var alpha = 1.0 - this.attr_('highlightSeriesBackgroundAlpha');
if (alpha) {
// Activating background fade includes an animation effect for a gradual
// fade. TODO(klausw): make this independently configurable if it causes