-
- // Current pixel coordinates that the data point would fill.
- currXPx = Math.round(xNormal * graphWidth);
- currYPx = Math.round(yNormal * graphHeight);
-
- // Skip over pushing points that lie on the same pixel.
- // TODO(antrob): optimize this for graphs with error bars.
- if (skip_opt || prevXPx != currXPx || prevYPx != currYPx) {
- var point = {
- // TODO(danvk): here
- x: xNormal,
- y: yNormal,
- xval: xValue,
- yval: yValue,
- name: setName
- };
- this.points.push(point);
- }
- prevXPx = currXPx;
- prevYPx = currYPx;