X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-canvas.js;h=5b074968b576d9db6ec4beef690ef72904948237;hb=3df0ccf0a09d28577e3a695302f1deb926ae8a83;hp=0813691c26a7200cd381c69ed9d3dd062f49e5f3;hpb=fbe31dc8001c5122d8fe980b4eede83fd71a835c;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 0813691..5b07496 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -2,17 +2,15 @@ // All Rights Reserved. /** - * @fileoverview Subclasses various parts of PlotKit to meet the additional - * needs of Dygraph: grid overlays and error bars + * @fileoverview Based on PlotKit, but modified to meet the needs of dygraphs. + * In particular, support for: + * - grid overlays + * - error bars + * - dygraphs attribute system */ -// Subclass PlotKit.Layout to add: -// 1. Sigma/errorBars properties -// 2. Copy error terms for PlotKit.CanvasRenderer._renderLineChart - /** - * Creates a new DygraphLayout object. Options are the same as those allowed - * by the PlotKit.Layout constructor. + * Creates a new DygraphLayout object. * @param {Object} options Options for PlotKit.Layout * @return {Object} The DygraphLayout object */ @@ -121,7 +119,6 @@ DygraphLayout.prototype.evaluateWithError = function() { for (var setName in this.datasets) { var j = 0; var dataset = this.datasets[setName]; - if (PlotKit.Base.isFuncLike(dataset)) continue; for (var j = 0; j < dataset.length; j++, i++) { var item = dataset[j]; var xv = parseFloat(item[0]); @@ -189,7 +186,7 @@ DygraphCanvasRenderer = function(dygraph, element, layout, options) { this.container = this.element.parentNode; // Stuff relating to Canvas on IE support - this.isIE = PlotKit.Base.excanvasSupported(); + this.isIE = (/MSIE/.test(navigator.userAgent) && !window.opera); if (this.isIE && !isNil(G_vmlCanvasManager)) { this.IEDelay = 0.5;