p5(sketch => {
sketch.setup = function() {
sketch.createCanvas(width, height);
sketch.textAlign(sketch.CENTER, sketch.CENTER);
sketch.line(0, margin, screen.width, margin)
sketch.noStroke();
for(let i = 0; i < data.length; i++) {
const screenX = xScale(data[i]);
sketch.fill(70, 130, 180)
sketch.ellipse(screenX, margin, 5, 5);
sketch.fill(0)
sketch.text(data[i], screenX, 30)
}
}
})