import * as utils from './dygraph-utils';
import DEFAULT_ATTRS from './dygraph-default-attrs';
import OPTIONS_REFERENCE from './dygraph-options-reference';
+import IFrameTarp from './iframe-tarp';
import DefaultHandler from './datahandler/default';
import ErrorBarsHandler from './datahandler/bars-error';
// We cover iframes during mouse interactions. See comments in
// dygraph-utils.js for more info on why this is a good idea.
- tarp: new utils.IFrameTarp(),
+ tarp: new IFrameTarp(),
// contextB is the same thing as this context object but renamed.
initializeMouseDown: function(event, g, contextB) {
if (this.getOption('highlightSeriesOpts')) {
ctx.clearRect(0, 0, this.width_, this.height_);
var alpha = 1.0 - this.getNumericOption('highlightSeriesBackgroundAlpha');
+ var backgroundColor = utils.toRGB_(this.getOption('highlightSeriesBackgroundColor'));
+
if (alpha) {
// Activating background fade includes an animation effect for a gradual
// fade. TODO(klausw): make this independently configurable if it causes
}
alpha *= opt_animFraction;
}
- ctx.fillStyle = 'rgba(255,255,255,' + alpha + ')';
+ ctx.fillStyle = 'rgba(' + backgroundColor.r + ',' + backgroundColor.g + ',' + backgroundColor.b + ',' + alpha + ')';
ctx.fillRect(0, 0, this.width_, this.height_);
}
ctx.save();
for (i = 0; i < this.selPoints_.length; i++) {
var pt = this.selPoints_[i];
- if (!utils.isOK(pt.canvasy)) continue;
+ if (isNaN(pt.canvasy) || pt.canvasy === null || pt.canvasy === undefined) continue;
var circleSize = this.getNumericOption('highlightCircleSize', pt.name);
var callback = this.getFunctionOption("drawHighlightPointCallback", pt.name);