BarChart is a D3.js Version 5 application.
This project is from FreeCodeCamp Project 1
I used ideas from This CodePen
Source Code
I commented every line of D3.js code, in the file BarChartUnderstandEveryLine.js.
The top few things I learned were
selectAll().data().enter().append();
append()
is the function call that actually renders content to the screen by appending to the DOM.scaleLinear().domain().range()
creates a function that transforms data input into output that appears at the correct place on the web page<div>
, it just appears in different places when you mouseover.