This repository contains the slides and examples that are discussed in my short workshop about doing data visualization with HTML5 canvas.
See the examples folder for the following complete code files from which I am using snippets in my slidedeck:
Creating a straightforward canvas and getting the context to draw on
On (Mac's) retina screens, images created by canvas look a bit blurry. This example shows a simple way to counter that, by increasing the canvas size, but shrinking it back into the original width and height
Contains the code for all the basic shapes discussed in the workshop: rectangles, text, circles, lines and paths
Contains the code to create a Quadratic and Cubic bezier curve
Recreate one week of my Breathing Earth visualization in a simple loop over all the datapoints
How to "mimic" a linear animation by using the idea of frames and requestAnimationFrame
With a few updates to the linear animation and d3's interpolation and/or easing functions, you can also create an "eased" animation
An example of how, instead of position, opacity and radius of a circle can be changed