Skip to main content
100%

part 1, Zoom and Panning with D3.js and canvas,

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 4, 2018
Created on Sep 4, 2018

This example shows a canvas-based scatter plot of 10,000 random data points, with the page built for future brushing interactions. It uses D3.js v4 to create SVG axes and labels, while rendering the points themselves on a separate HTML5 canvas element for performance. The code initializes linear scales for both x and y dimensions, draws the axes with `d3.axisBottom` and `d3.axisLeft`, and plots each point using the Canvas API’s `arc` and `fill` methods. The canvas is positioned over the SVG using CSS classes, demonstrating a hybrid rendering approach.

AI-generated description

Part 1 of creating a canvas based brushable scatter plot, based on this medium article.

mit Licensed

Similar vizzes