All Apps and Add-ons

Treemap: How to open a search using drilldown when clicked/zoomed on parent rectangle?


I was able to open a search using drilldown when clicked on child rectangle of tree maps as mentioned in official documentation here

But I need to open a search when parent category is Zoomed/Clicked, so far I have tried below code but it doesn't pass the token until clicked on children rectangle.

  <label>treemaps drilldown</label>
      <viz type="treemap_app.treemap">
          <query>sourcetype="syslog"| stats sum(traffic) by category, application</query>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="drilldown">all</option>
        <option name="trellis.size">medium</option>
          <set token="category">$row.category$</set>

    <panel depends="$category$">
        <title>Top Applications of Category $category$ </title>
          <query>sourcetype="syslog" category=$category$| top application</query>
        <option name="charting.chart">bar</option>
        <option name="charting.drilldown">none</option>

Is it possible to use drilldown when clicked on parent rectangle in treemaps?

Super Champion

Unfortunately, Treemap doesn't support drilldowns until you reach the child level. Generally it would open in search, unless you defined a drilldown behavior. From looking at your code, it should be picking up the parent category and using that in your second search. I understand it is more of an inconvenience to the users, but I don't think there is a way around it unless you were to customize the treemap code itself.


Yeah, seems legit.

0 Karma
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.