# How to we hide empty leaf in treemap plotly dash

**URL:** <https://community.plotly.com/t/how-to-we-hide-empty-leaf-in-treemap-plotly-dash/61549>\
**Category:** 📊 Plotly Python\
**Tags:** tips-and-tricks, question\
**Created:** [March 1, 2022, 6:22pm UTC](https://community.plotly.com/t/how-to-we-hide-empty-leaf-in-treemap-plotly-dash/61549 "2022-03-01T18:22:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ameyakambli](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@ameyakambli](https://community.plotly.com/u/ameyakambli)\
**Post date:** [March 1, 2022, 6:22pm UTC](https://community.plotly.com/t/how-to-we-hide-empty-leaf-in-treemap-plotly-dash/61549/1 "2022-03-01T18:22:38Z")

</div>

i have 5 catergories with different depths, i would ideally want to limit the drilling of tree map based on max level of that particular catergory. For example CATEGORY A has just 3 LEVELS vs CATEGORY D has 8 levels, so ideally i would want to limit the drillng of treemap for Catergory A limited to 3 levels instead of 8 with 5 blank levels (HIDE EMPTY LEAVES).

Is there any way to achieve this, or any support that i can expect in the future
