this.setPointsLengths = [];
this.setPointsOffsets = [];
+ var connectSeparated = this.attr_('connectSeparatedPoints');
for (var setIdx = 0; setIdx < this.datasets.length; ++setIdx) {
var dataset = this.datasets[setIdx];
var setName = this.setNames[setIdx];
yval: yValue,
name: setName
};
+ if (connectSeparated && item[1] === null) {
+ point.yval = null;
+ }
this.points.push(point);
setPointsLength += 1;
}
*/
DygraphLayout.prototype.unstackPointAtIndex = function(idx) {
var point = this.points[idx];
+ // If the point is missing, no unstacking is necessary
+ if (!point.yval) {
+ return point;
+ }
// Clone the point since we modify it
var unstackedPoint = {};
// The unstacked yval is equal to the current yval minus the yval of the
// next point at the same xval.
for (var i = idx+1; i < this.points.length; i++) {
- if (this.points[i].xval == point.xval) {
+ if ((this.points[i].xval == point.xval) && this.points[i].yval) {
unstackedPoint.yval -= this.points[i].yval;
break;
}