Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*if(i !== index){
dataPoints = dataPoints.splice(i,1);
index = i;
}*/
const y = current.y + m * (currentX - current.x);
return [currentX, y];
}
}
}
function getDataByPosition(scale, y, coord) {
const yRatio = (y - coord.start.y) / (coord.end.y - coord.start.y);
return scale.invert(yRatio).toFixed(2);
}
Animate.registerAnimation('appear', 'clipingWithData', clipingWithData);
minX = minX > point.x ? point.x : minX;
maxX = maxX < point.x ? point.x : maxX;
minY = minY > point.y ? point.y : minY;
maxY = maxY < point.y ? point.y : maxY;
});
return {
minX,
maxX,
minY,
maxY,
centerX: (minX + maxX) / 2,
centerY: (minY + maxY) / 2,
};
}
Animate.registerAnimation('update', 'groupProgress', progressUpdate);