The treemap widget allows you to display proportions of one or more datasets. This widget can display a single dataset with corresponding proportions, or multiple datasets with nested proportions.
Configuration
- Select from the available data sources.
- Configure the query, see the following resources for more information:
- Metrics: See the querying documentation to configure a metric query.
- Events: See the log search documentation to configure a log event query.
- (Optional) Modify query with a formula.
- Customize your graph.
Customization
Context links
Context links are enabled by default, and can be toggled on or off. Context links bridge dashboard widgets with other pages (in Datadog, or third-party).
Display and interaction
Filter and focus
In the case where multiple groups of data are plotted at once, you can filter the widget to a single category and view proportions within it.
To filter and focus on a single category, hover over the outer portion of the category, and click. To go back to the previous view, click the back button on the top left header of the widget.
To access the context menu, first hover over an individual category: this can be a nested category, or group - such as Canada, or Canada > Edge in the following example. This reveals a dropdown button in the top right corner. When clicked, the context menu appears.
Full-screen
Viewing the treemap widget in full-screen reveals the standard set of full-screen options.
Like the treemap widget, the pie chart widget can also be used to display nested proportions. The primary difference between the two is that the pie chart displays proportions in radial slices, and the treemap displays nested rectangles.
API
This widget can be used with the Dashboards API. See the following table for the widget JSON schema definition:
Expand All
DEPRECATED: (deprecated) The attribute formerly used to determine color in the widget.
Allowed enum values: user
default: user
The flag for toggling context menu link visibility.
The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables.
The URL of the custom link. URL must include http
or https
. A relative URL must start with /
.
The label ID that refers to a context menu link. Can be logs
, hosts
, traces
, profiles
, processes
, containers
, or rum
.
DEPRECATED: (deprecated) The attribute formerly used to group elements in the widget.
Allowed enum values: user,family,process
List of treemap widget requests.
List of formulas that operate on queries.
Define a display mode for the table cell.
Allowed enum values: number,bar
List of conditional formats.
Comparator to apply.
Allowed enum values: =,>,>=,<,<=
Color palette to apply to the background, same values available as palette.
Color palette to apply to the foreground, same values available as palette.
Displays an image as the background.
Metric from the request to correlate this conditional format with.
Color palette to apply.
Allowed enum values: blue,custom_bg,custom_image,custom_text,gray_on_white,grey,green,orange,red,red_on_white,white_on_gray,white_on_green,green_on_white,white_on_red,white_on_yellow,yellow_on_white,black_on_light_yellow,black_on_light_green,black_on_light_red
Defines the displayed timeframe.
Value for the comparator.
String expression built from queries, formulas, and functions.
Options for limiting results returned.
Number of results to return.
Direction of sort.
Allowed enum values: asc,desc
default: desc
Styling options for widget formulas.
Index specifying which color to use within the palette.
The widget metrics query.
List of queries that can be returned directly or used in formulas.
A formula and functions metrics query.
The aggregation methods available for metrics queries.
Allowed enum values: avg,min,max,sum,last,area,l2norm,percentile
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for metrics queries.
Allowed enum values: metrics
Name of the query for use in formulas.
Metrics query definition.
A formula and functions events query.
Aggregation methods for event platform queries.
Allowed enum values: count,cardinality,median,pc75,pc90,pc95,pc98,pc99,sum,min,max,avg
A time interval in milliseconds.
Measurable attribute to compute.
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for event platform-based queries.
Allowed enum values: logs,spans,network,rum,security_signals,profiles,audit,events,ci_tests,ci_pipelines,incident_analytics
Number of groups to return.
Options for sorting group by results.
Aggregation methods for event platform queries.
Allowed enum values: count,cardinality,median,pc75,pc90,pc95,pc98,pc99,sum,min,max,avg
Metric used for sorting group by results.
Direction of sort.
Allowed enum values: asc,desc
default: desc
An array of index names to query in the stream. Omit or use []
to query all indexes at once.
Name of the query for use in formulas.
Option for storage location. Feature in Private Beta.
Process query using formulas and functions.
The aggregation methods available for metrics queries.
Allowed enum values: avg,min,max,sum,last,area,l2norm,percentile
The source organization UUID for cross organization queries. Feature in Private Beta.
Data sources that rely on the process backend.
Allowed enum values: process,container
Whether to normalize the CPU percentages.
Number of hits to return.
Name of query for use in formulas.
Direction of sort.
Allowed enum values: asc,desc
default: desc
An array of tags to filter by.
A formula and functions APM dependency stats query.
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for APM dependency stats queries.
Allowed enum values: apm_dependency_stats
Determines whether stats for upstream or downstream dependencies should be queried.
Name of query to use in formulas.
operation_name [required]
Name of operation on service.
Filter APM data by the second primary tag. primary_tag_name
must also be specified.
APM statistic.
Allowed enum values: avg_duration,avg_root_duration,avg_spans_per_trace,error_rate,pct_exec_time,pct_of_traces,total_traces_count
APM resource stats query using formulas and functions.
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for APM resource stats queries.
Allowed enum values: apm_resource_stats
Array of fields to group results by.
Name of this query to use in formulas.
Name of operation on service.
Value of the second primary tag by which to filter APM data. primary_tag_name
must also be specified.
APM resource stat name.
Allowed enum values: errors,error_rate,hits,latency_avg,latency_distribution,latency_max,latency_p50,latency_p75,latency_p90,latency_p95,latency_p99
A formula and functions metrics query.
Additional filters applied to the SLO query.
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for SLO measures queries.
Allowed enum values: slo
Group mode to query measures.
Allowed enum values: overall,components
SLO measures queries.
Allowed enum values: good_events,bad_events,good_minutes,bad_minutes,slo_status,error_budget_remaining,burn_rate,error_budget_burndown
Name of the query for use in formulas.
ID of an SLO to query measures.
Name of the query for use in formulas.
Allowed enum values: metric,time_slice
A formula and functions Cloud Cost query.
Aggregator used for the request.
Allowed enum values: avg,last,max,min,sum,percentile
The source organization UUID for cross organization queries. Feature in Private Beta.
Data source for Cloud Cost queries.
Allowed enum values: cloud_cost
Name of the query for use in formulas.
Query for Cloud Cost data.
Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets.
Allowed enum values: timeseries,scalar,event_list
DEPRECATED: (deprecated) The attribute formerly used to determine size in the widget.
Allowed enum values: pct_cpu,pct_mem
Time setting for the widget.
The available timeframes depend on the widget you are using.
Allowed enum values: 1m,5m,10m,15m,30m,1h,4h,1d,2d,1w,1mo,3mo,6mo,week_to_date,month_to_date,1y,alert
Used for arbitrary live span times, such as 17 minutes or 6 hours.
Type "live" denotes a live span in the new format.
Allowed enum values: live
Unit of the time span.
Allowed enum values: minute,hour,day,week,month,year
Used for fixed span times, such as 'March 1 to March 7'.
Start time in seconds since epoch.
End time in seconds since epoch.
Type "fixed" denotes a fixed span.
Allowed enum values: fixed
Type of the treemap widget.
Allowed enum values: treemap
default: treemap
{
"color_by": "user",
"custom_links": [
{
"is_hidden": false,
"label": "Search logs for {{host}}",
"link": "https://app.datadoghq.com/logs?query={{host}}",
"override_label": "logs"
}
],
"group_by": "user",
"requests": [
{
"formulas": [
{
"alias": "string",
"cell_display_mode": "number",
"conditional_formats": [
{
"comparator": ">",
"custom_bg_color": "string",
"custom_fg_color": "string",
"hide_value": false,
"image_url": "string",
"metric": "string",
"palette": "blue",
"timeframe": "string",
"value": 0
}
],
"formula": "func(a) + b",
"limit": {
"count": "integer",
"order": "string"
},
"style": {
"palette": "classic",
"palette_index": 1
}
}
],
"q": "string",
"queries": [],
"response_format": "timeseries"
}
],
"size_by": "pct_cpu",
"time": {
"live_span": "5m"
},
"title": "string",
"type": "treemap"
}
Further Reading
Additional helpful documentation, links, and articles: