X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=dygraph-canvas.js;h=04c53b81bd077f069ce928a0214fd22fd5a62a0a;hb=ecf9b464f6a10e3b99f22132ec300e2f83584aaf;hp=971a038199634630973725313d79c754fd081ccf;hpb=74a5af31a87b245b89337037bc33a0e900153eae;p=dygraphs.git diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 971a038..04c53b8 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -12,12 +12,8 @@ */ /** - * This class determines the charting area (in pixel coordinates), maps the - * percentage coordinates in the DygraphLayout to pixels and draws them. - * It's also responsible for creating chart DOM elements, i.e. annotations, - * tick mark labels, the title and the x/y-axis labels. - * This class is based on PlotKit.CanvasRenderer. - * + * The DygraphCanvasRenderer class does the actual rendering of the chart onto + * a canvas. It's based on PlotKit.CanvasRenderer. * @param {Object} element The canvas to attach to * @param {Object} elementContext The 2d context of the canvas (injected so it * can be mocked for testing.) @@ -790,7 +786,9 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() { prevX = point.canvasx; prevY = point.canvasy; } else { - // TODO(danvk): figure out why this conditional is necessary. + // TODO(antrob): skip over points that lie on a line that is already + // going to be drawn. There is no need to have more than 2 + // consecutive points that are collinear. if (strokeWidth) { ctx.beginPath(); ctx.strokeStyle = color;