Treemap

Treemap

Simple XML for treemaps

Custom visualizations use a namespaced syntax for Simple XML. Specific visualization properties are appended to the app and visualization context.


Add a treemap to a dashboard panel

You can add a treemap to a dashboard panel using Simple XML. Use this syntax to specify the app and visualization context.

<viz type="treemap_app.treemap">
</viz>


Configure treemap properties

To configure a treemap property, append any of the following property names to this context.

treemap_app.treemap


Option name Accepted values Default Example
useZoom [ true | false] true
<option name="treemap_app.treemap.useZoom">false</option>
showLabels [ true | false] true
<option name="treemap_app.treemap.showLabels">false</option>
showLegend [ true | false] true
<option name="treemap_app.treemap.showLegend">false</option>
showTooltip [ true | false] true
<option name="treemap_app.treemap.showTooltip">true</option>
maxCategories Number
For better results, avoid especially large numbers.
10
<option name="treemap_app.treemap.maxCategories">4</option>
useColors [ true | false] true
<option name="treemap_app.treemap.useColors">false</option>
colorMode [ categorical | sequential] categorical
<option name="treemap_app.treemap.colorMode">sequential</option>
minColor Any valid CSS color string. #d93f3c
<option name="treemap_app.treemap.minColor">#6db7c6</option>
maxColor Any valid CSS color string. #3fc77a
<option name="treemap_app.treemap.maxColor">#d93f3c</option>
numBins Any number from 3-9. 6
<option name="treemap_app.treemap.numOfBins">3</option>

Example Simple XML source

Here is an example dashboard panel.

<dashboard>
  <label>Treemap Example Dashboard</label>
  <row>
    <panel>
      <title>My example dashboard</title>
      <viz type="treemap_app.treemap">
        <search>
          <query>| inputlookup splunk_files.csv 
| rex field=path "\./(?<level1>[A-Za-z0-9]*)/(?<level2>[A-Za-z0-9]*)" 
| stats sum(size) as size by level1, level2</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
      </viz>
    </panel>
  </row>
  <row>
    <panel>
      <title>Max Categories = 2</title>
      <viz type="treemap_app.treemap">
        <search>
          <query>| inputlookup splunk_files.csv 
| rex field=path "\./(?<level1>[A-Za-z0-9]*)/(?<level2>[A-Za-z0-9]*)" 
| stats sum(size) as size by level1, level2</query>
          <earliest>0</earliest>
        </search>
        <option name="treemap_app.treemap.useZoom">true</option>
        <option name="treemap_app.treemap.showLabels">true</option>
        <option name="treemap_app.treemap.showLegend">true</option>
        <option name="treemap_app.treemap.showTooltip">true</option>
        <option name="treemap_app.treemap.maxCategories">2</option>
        <option name="treemap_app.treemap.useColors">true</option>
        <option name="treemap_app.treemap.colorMode">categorical</option>
        <option name="treemap_app.treemap.minColor">#d93f3c</option>
        <option name="treemap_app.treemap.maxColor">#3fc77a</option>
        <option name="treemap_app.treemap.numOfBins">6</option>
      </viz>
    </panel>
  </row>
</dashboard>
Last modified on 12 August, 2016
Add a treemap to a dashboard   Release notes

This documentation applies to the following versions of Treemap: 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0, 1.5.0


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters