This topic describes how to configure a treemap chart to display query results. It also includes examples.

Background information

A treemap chart includes multiple rectangles that represent the data volume. A larger rectangle area represents a larger proportion of the categorical data.

Rectangles in a treemap chart are sorted.

Procedure

  1. On the Search & Analysis page of a Logstore, enter a search and analytics statement in the search box, specify the time range, and then click Search & Analyze.
    The Chart tab is automatically displayed when a query is completed.
  2. Click Treemap chart - 001 to display the query results in a treemap chart.
  3. On the Properties tab on the right, configure the properties of the treemap chart.
    Configuration item Description
    Legend Filter The categorical field.
    Value Column The numeric value of a field. A greater field value represents a larger rectangle area.

Examples

To query the distribution of hostnames in NGINX logs, run the following statement:
* | select hostname, count(1) as count group by hostname order by count desc limit 1000 

Select hostname for Legend Filter and count for Value Column.

Hierarchy chart