This video is available to students only
Adding freezing
To ease into our drawing data step, let's start by adding a circle that shows what temperatures are below freezing.
Let's ease into drawing our data elements by drawing a <circle>
to show where freezing is on our chart. We'll want to write this code in our Draw data step.
We can first check if our temperatures drop low enough:
1
const containsFreezing = radiusScale.domain()[0] < 32
If our temperatures do drop below freezing, we'll add a <circle>
whose radius ends at 32 degrees Fahrenheit.
This page is a preview of Fullstack D3 Masterclass