Last active
April 10, 2018 19:27
-
-
Save xoor-io/8dedc062a844c5b900696a0ba286e1bf to your computer and use it in GitHub Desktop.
d3-canvas-zoom-02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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