A Tree Map Diagram. This is the fifth certification project of freeCodeCamp's Data Visualization Course.
- D3js version 7
- JavaScript
- GitHub, GitBash
- GitHub Pages for hosting
- Sublime Text (Editor)
- VS Code (Live Server)
The project is data-oriented. Visual-renders are dictated by: the availability and selection of data; user-interaction. The es modules is used to compartmentalize scripts - a comfortable way of developing and debugging.
- Created initial json file as data-store to house external data and visual specifications for the tree map.
- Made sure that the external datasets are fetched and available in the data-store.
- Made submodules to divide tasks on rendering contents.
- The es module does not need the defer attribute. It is placed within the html
<body/>
. It acts similar to a deferred script. - This project used an Immediately Invoked Function Expression (IIFE) - it will run when the
<script/>
starts to execute. - Important JSON rules to avoid errors:
a. Do not use
// comments
. a. The latest-coded object-property must not be tailed with a comma. - A D3 Tree Map hierarchical layout requires node.value.