Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Different way of counting in every level of the treemap

I’m trying to implement a treemap that represents buildings, The first level is the building types and the second level is the building specialty. Given that the same building can have only one type and may have many specialties. I couldn’t have a sperate count for each level

however, I succeeded in making the real count appear to the leave levels which are the specialties by using this code :

    [0].customdata = [
    v if[0].ids[i]
    not in[0].parents else [""]
    for i, v in enumerate([0].customdata)