Command Palette

Search for a command to run...

Hectal
Phase 0: Start Here: A Chart Is Just Shapes
Data Visualization · Exercise 4 of 5 PreviousNext
Beginner

Paint a dot on a canvas

The canvas has no size yet. Give it width="120" and height="120" attributes (not CSS).

Then, in the JavaScript, paint a filled circle centred at (60, 60) with radius 40 in #e76f51.

What Check tests

  1. The canvas's drawing grid is 120 × 120
  2. The centre pixel is #e76f51
  3. A corner is still empty
  4. It was painted with arc and fill

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.