# Shape generation function used by Treemap example

**URL:** <https://community.plotly.com/t/shape-generation-function-used-by-treemap-example/1653>\
**Category:** plotly.js\
**Created:** [July 26, 2016, 12:16pm UTC](https://community.plotly.com/t/shape-generation-function-used-by-treemap-example/1653 "2016-07-26T12:16:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cascaid](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/cascaid/32/439_2.png) [@cascaid](https://community.plotly.com/u/cascaid)\
**Post date:** [July 26, 2016, 12:16pm UTC](https://community.plotly.com/t/shape-generation-function-used-by-treemap-example/1653/1 "2016-07-26T12:16:09Z")

</div>

Hi there,

I was looking to reproduce the treemap example shown in the plotly.js documentation, but was unable to find where the Treemap.generate funciton used to generate the shapes is coming from.

Is this part of plotly or D3, or another third party library?

Thanks

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [July 28, 2016, 2:13pm UTC](https://community.plotly.com/t/shape-generation-function-used-by-treemap-example/1653/2 "2016-07-28T14:13:30Z")

</div>

Here it is [https://cdn.rawgit.com/imranghory/treemap-squared/master/min/treemap-squared-0.5.min.js](https://cdn.rawgit.com/imranghory/treemap-squared/master/min/treemap-squared-0.5.min.js)

---

<div class="post-metadata">

**Author:** ![cascaid](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/cascaid/32/439_2.png) [@cascaid](https://community.plotly.com/u/cascaid)\
**Post date:** [July 28, 2016, 5:25pm UTC](https://community.plotly.com/t/shape-generation-function-used-by-treemap-example/1653/3 "2016-07-28T17:25:21Z")

</div>

Perfect, thank you very much!
