Start Here: A Chart Is Just Shapes
What you will learn, what you get, where you write code, and your first pictures in SVG and Canvas: a chart is numbers turned into shapes.
This phase is your map. Before any library, you find out what the whole course teaches, what you will be able to build at the end, and exactly where you will type your code: first in the editor on this page, then in one file on your own computer.
Then you draw. A chart is only shapes whose size or position comes from numbers, so you start with shapes: a bar, a circle, a smiley face, in both of the browser's drawing systems, SVG and Canvas. You see what each one is good at and how each one fails.
At the end you build the first page of the Lumen Bikes dashboard: a title, three boxes, and a week of rides drawn as seven bars by hand. Every later phase grows this same page.
Phase 0 · the story
Tomás, founder
“I have 365 days of rides in a spreadsheet and I still can't tell you how our year went.”
Lumen Bikes rents bikes from 25 stations across Ardenvale, a small island city in the Atlantic. On Monday morning Tomás, the founder, opens the spreadsheet of last year's rides: 365 rows, one number per day. He scrolls for a minute, then gives up.
"Were summers busy? Did the rain hurt us? Was there a bad day?" Every answer is in those numbers, but nobody can see it. The board meets in a few weeks, and he wants a page that shows the city's bikes at a glance.
So the team starts a dashboard. In this phase you meet the plan, set up the place where you will write code, and draw the dashboard's very first picture: last week's rides as seven bars.
In this phase
You will learn
- Say what this course teaches, in order, and what you can build when you finish it
- Write and run code in the editor on this page, and in a file on your own computer
- Draw simple shapes in SVG and in Canvas, and explain how the two differ
- Start the project folder you will grow for the whole course
You write code in
In the editor on this page, and in your own lumen-dashboard/index.html (no install needed)
Files you touch
- index.html
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.