Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
firstName="Shirley"
lastName="Wu"
handle="sxywu"
// RACE CONDITION, RERUN AFTER ALL IMAGES ARE LOADED
functionbadgeCode(g,context,frameNumber){
// g: a <g>, i.e. d3.select(... the node)
// context: a canvas context, useful for doing canvas drawing
// frameNumber: a number that represents the frame (1, 2, … 10) for psuedo-animation.
// width & height are available via the environment, as is d3
// Note: the <g> is drawn on top of the <canvas>
images[frameNumber-1].then(image=>{
context.drawImage(image,0,0,width,height)
})
}
isTextLight=true
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.