How do I display a "zoom label" at the top of the tree map?

When zooming into the tree map, I would like to be able to see which cell I just zoomed into by displaying the cell name at the top of the tree map.

This can be accomplished by using either the navigation trail control to display the path of all the zoom nodes, or by adding a style with a gutter border and a label to level "0" to display just the immediate zoom node.

To learn more about the Navigation Trail control, see the examples\applet\controls\1- navigation-trail example within the Enterprise Tree Map distribution.

Otherwise, the following displays just the label of the current zoom level, or "All Data" if the tree map is entirely zoomed out, in a gutter border at the top of the tree map:

<style renderLevel="0">
  <cell>
    <border type="gutter" color="#333333">
      <margins top="2" left="2" right="2" bottom="2" />
    </border>
  </cell>

  <label visible="true" format="${node['label']|'All Data'}">
    <font name="Arial" size="12" color="#FFFFFF"
          style="bold" shadow="false" />
  </label>
</style>

If you only want the border to appear once you have already zoomed in, in Enterprise Tree Map v2.2 or higher, you can use the following code instead:

<style type="context">
  <context type="compound" join="and">
    <context type="compare"
             leftOperand="${treemap.zoomNode}"
             rightOperand="${node}"
             operator="equals" />

    <context type="compare"
             leftOperand="${treemap.zoomLevel}"
             rightOperand="1"
             operator="notEquals" />
  </context>

  <cell>
    <border type="gutter" color="#333333">
      <margins top="2" left="2" right="2" bottom="2" />
    </border>
  </cell>

  <label visible="true" format="${node['label']}">
    <font name="Arial" size="12" color="#FFFFFF"
          style="bold" shadow="false" />
  </label>
</style>