Canvas tutorial - Turn SVG scatterplot into Canvas - Normal level
This scatterplot visualizes IMDb movie data, plotting each film's budget against its rating, with point size and opacity reflecting the profit ratio and color encoding the release year. The example is a tutorial that challenges the viewer to convert an existing SVG-based D3.js visualization into one rendered on an HTML5 canvas. The provided code uses D3 v4 helper functions like `d3.scaleLinear`, `d3.scaleLog`, `d3.scaleSqrt`, and `d3.scaleSequential` for data scaling, while the actual circle drawing is currently done with SVG elements, which the tutorial instructs replacing with canvas drawing commands.
AI-generated descriptionThis scatterplot is made with d3.js and SVG - For the canvas tutorial it is now your job to turn this scatterplot into one uses canvas for the visual part (the drawing of the circles). You can still use d3's helper functions for things such as scales, d3.select, etc.
See the other two levels here: <a href='https://bl.ocks.org/nbremer/aae35b358c7450b70cc12b27e48c6196'>Medium level</a> and <a href='https://bl.ocks.org/nbremer/7eda7f35215d6a5eb2a485f645844676'>Extreme level</a>
If you're completely stuck (and please, for your own benefit, only then) you can look at the solution here
Built with blockbuilder.org
forked from <a href='http://bl.ocks.org/nbremer/'>nbremer</a>'s block: <a href='http://bl.ocks.org/nbremer/0ed7cfdca6487b8cda79af3aaedf2ec5'>Canvas tutorial - Turn SVG scatterplot into Canvas - Normal level</a>