Skip main navigation

TreeMap code

This rectangular tree chart uses d3.hierarchy(data) to parse JSON into a tree structure, and d3.tree() to calculate the layout.

This rectangular tree chart uses d3.hierarchy(data) to parse JSON into a tree structure, and d3.tree() to calculate the layout.

This article is from the free online

Data Visualisation

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now