This version is old school.
Please find jQuery plugins on npm.
jQuery Treemap
by Evan Carey
jQuery plugin for creating squarified treemap of hierarchical data using HTML5 canvas
jQuery plugin for creating squarified treemap of hierarchical data using HTML5 canvas