Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
d3-canvas-zoom-02
function drawPoint(scaleX, scaleY, point, k) {
context.beginPath();
context.fillStyle = pointColor;
const px = scaleX(point[0]);
const py = scaleY(point[1]);
context.arc(px, py, 1.2 * k, 0, 2 * Math.PI, true);
context.fill();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment