Learning

Record learning from practice

View project on GitHub

Web

FastAPI

Nginx

Heatmap

W3School

Q: Why remove following line will make the number disappear?

// drawFace
  ctx.beginPath();
  ctx.arc(0, 0, radius*0.1, 0, 2*Math.PI);
  ctx.fillStyle = '#333';
  ctx.fill();

A: There are no set fillStyle before ctx.fillText of drawNumbers, so the last fillStyle is white when ctx.fillText, so can not see the number in white background.