class_docstr: Treemap graph class
code: def _rect(self, serie, serie_node, rects, val, x, y, w, h, i):
      rx, ry = self.view((x, y))
      rw, rh = self.view((x + w, y + h))
      rw -= rx
      rh -= ry
  
      metadata = serie.metadata.get(i)
  
      val = self._format(serie, i)
  
      rect = decorate(
          self.svg, self.svg.node(rects, class_="rect"), metadata
      )
  
      alter(
          self.svg.node(
              rect,
              "rect",
              x=rx,
              y=ry,
              width=rw,
              height=rh,
              class_="rect reactive tooltip-trigger",
          ),
          metadata,
      )
  
      self._tooltip_data(
          rect,
          val,
          rx + rw / 2,
          ry + rh / 2,
          "centered",
          self._get_x_label(i),
      )
      self._static_value(
          serie_node, val, rx + rw / 2, ry + rh / 2, metadata
      )
  
file_path: pygal/pygal/graph/treemap.py
imports: from pygal.adapters import none_to_zero, positive
  from pygal.graph.graph import Graph
  from pygal.util import alter, cut, decorate
label_desc: Use image node_id 1 for calling the Treemap obj's underlying member method code with example usage: obj._rect(serie, serie_node, rects, val, x, y, w, h, i) without return types