Pie visualization
Latest Dynatrace
Example
Use a pie visualization:
When you have just a few (no more than 5 to 7) clearly distinguishable categories/slices in your data. In such cases, a pie visualization can be simple and easy to read.
When you want to show proportions or percentages of a whole. For example, showing pods by phase.
When you want to highlight composition. For example, you might use a pie visualization to illustrate the distribution of errors by error type.
The above pie chart is based on the following query.
fetch logs| summarize count(), by:{loglevel}
Title
Use this field to add a title. The edit box is displayed at the top of the options panel.
You can use emojis such as 😃 and 🌍 and ❤️.
You can use variables.
Example:
- Define variables called
Status
andEmoji
in your dashboard. - Set Title to
Current $Emoji status is $Status
. - Set
Status
toGood
. - Set
Emoji
to🌍
.
The title will be displayed as Current 🌍 status is Good
.
Visualization
If you aren't sure that you chose the right visualization, use the visualization selector to try different visualizations.
Data mapping
The data mapping section shows how a column of your result is mapped to the visualization.
For a pie chart, the data mapping section includes:
- Slice—the column of your result that is displayed as a slice of the pie
- Value—the value to be reflected in the size of a slice
Pie chart options
To learn about options quickly and decide what works best for you, turn options on and off and see the effect immediately on your chart. For example, does it look best with a label or without? Turn that option on and off and see for yourself.
Color palettes
You can select a color palette from the list under Color palettes.
Slice
Set Slice to the unit by which you want to cut up your chart. Slice and Value together determine how to map your query results to your chart.
Value
Set Value to the value that determines the size of slices. Slice and Value together determine how to map your query results to your chart.
Chart
Use Hide labels to display or hide the labels on your chart.
Legend position
Select where to display the visualization legend:
- Automatic—Dynatrace chooses an appropriate location
- Hidden—no legend is displayed
- Bottom—the legend is displayed along the bottom of the visualization
- Right—the legend is displayed on the right side of the visualization
Total value
Use Relative values (%) to display chart values as absolute values or relative values (percentages of the total).
Merges slices
Use the Merge slices settings to determine how to merge slices in your chart.
-
Absolute
For example, if you have three slices with the following values:
- Slice 1:
40
- Slice 2:
5
- Slice 3:
5
If you select Absolute and set Absolute limit to
10
, slices 2 and 3 will merge into one group with the label set in Group label. - Slice 1:
-
Relative (%)
For example, if you have three slices with the following values:
- Slice 1 -
40
(80% of the total) - Slice 2 -
5
(10% of the total) - Slice 3 -
5
(10% of the total)
If you select Relative (%) and set Relative limit to
20
(20%), slices 2 and 3 (which are each below the relative value of 20%) will merge into one group with the label set in Group label. - Slice 1 -
-
Number of slices
For example, if you have three slices with the following values:
- Slice 1:
40
- Slice 2:
5
- Slice 3:
5
If you select Number of slices and set Slice limit to
2
, the first two slices will be displayed separately and the others will be merged into one group with the label set in Group label. - Slice 1:
Add color override
To override the color of a chart item, select Add color override, select the item from the list, and then set Color to the color you want to use for the selected item.
Thresholds
Configure thresholds
To configure thresholds in a dashboard or notebook visualization
-
Select to edit the visualization tile.
-
Select Thresholds.
- In Dashboards, select the Visualize tab in the side panel, and then select Thresholds.
- In Notebooks, select Thresholds in the side panel.
-
Select Add threshold.
-
Define the thresholds. For each range:
Select a color to display for that range
Select the operator to define the threshold for that range
Enter a static value to compare (using the selected operator) with the returned value
- Enter a label to associate with the defined range.
Labels apply only to charts with a Y axis, such as timeseries charts and the categorical bar chart.
Labels can't be defined for tables and the single value chart.
This example uses a bar chart, but the options apply to other visualizations.
-
In Dashboards, create a dashboard.
-
Select and, in the Snippets section of the menu, select Metrics > Chart top 10 hosts by CPU usage.
-
In the section edit panel, select the Visualize tab and select Bar chart. (To simplify the examples, we hid the chart legend (see Legend in Bar chart options), but that makes no difference to thresholds.)
-
Select Thresholds.
-
Select Add threshold.
An empty set of threshold fields is displayed.
-
Define the thresholds for the displayed metric. You can observe your changes in the Y axis of the chart.
In this example, we define three ranges of CPU usage with corresponding colors and labels.
You can see the ranges displayed on the Y-axis and in the tooltip.
To reset to defaults (discard threshold settings), select the trash can next to the item.
Edit thresholds
-
Select to edit the visualization tile.
-
Select Thresholds.
- In Dashboards, select the Visualize tab in the side panel, and then select Thresholds.
- In Notebooks, select Thresholds in the side panel.
-
From this point, you can do the following (expand rows for details):
To add thresholds (if the selected visualization supports additional thresholds), select Add threshold.
To turn off (hide) existing thresholds, use the switch. No settings are lost. You can turn them back on if you change your mind.
To delete existing thresholds, select the trash can .
To change existing threshold settings, just edit the fields.
To add a range to existing thresholds, select Add range.
To delete a range from existing thresholds, select the delete button in that row.
Units and formats
To override the default units and formats in a dashboard or notebook visualization
-
Select to edit the visualization tile.
-
Select the Visualize tab.
-
Select Units and formats.
-
Select Override.
-
Select Override
-
In the dropdown list, select the item for which you want to add a unit override.
This is a numeric column of the underlying DQL result, so it varies according to the query. For example:
- A
fetch events
query returns events. The dropdown list here lets you select a numeric field (such astransfer_size
) from the results. - A
timeseries avg(dt.host.cpu.usage)
query returns a single timeseries foravg(dt.host.cpu.usage)
. That timeseries is then the only selectable option in the list.
- A
-
Define the override.
- Default unit: The base unit in which the values were captured. It's
None
if it was not included in the DQL result, or its automatically defined by the unit passed from the DQL result. This field doesn't lead to any conversion. - Displayed unit: Once you define a default unit, you can use Displayed unit for conversion. For example, if the DQL result defined your numeric value in the result as
Bytes
, Displayed unit now offers a suitable list of byte conversions such asKilobyte
andMegabyte
. Unlike the Default unit, the Displayed unit is always a numeric conversion. - Decimals displays the default number of decimals (degree of precision) to display. To see it in action, change the Decimals selection and observe the change in the visualization.
- Suffix displays the suffix to display after the unit. To see it in action, enter a string and observe the change in the visualization. When you don't find the unit you're looking for, you can use Suffix to display the desired unit.
- Default unit: The base unit in which the values were captured. It's
-
Turn on Abbreviate large numbers if you want to display large figures in abbreviated form. For example,
1053
becomes1.1K
.
To reset to defaults (discard override settings for the selected item), select the trash can next to the item.
This example uses a line chart, but the options apply to other visualizations.
-
In Dashboards, create a dashboard.
-
Select and, in the Snippets section of the menu, select Metrics > Chart average CPU across all hosts.
-
In the section edit panel, select the Visualize tab and select Line chart.
-
Select Units and formats.
-
Select Override.
-
In the dropdown list, select the metric for which you want to add an override. There's only one metric to select in this example.
-
Define the override for the displayed metric. You can observe your changes in the Y-axis of the chart.
-
Default unit displays
Percent (%)
, which is the default unit for the selected metric. Try a different setting, such asOne
to instead display the result as a fraction of 1. -
Displayed unit displays
Auto
. You can change it to a different unit, such asOne
to instead display the result as a fraction of 1.Only linear and static conversions are supported. For example, you cannot convert
Degree Celsius(°C)
intoDegree Fahrenheit(°F)
, or convertUsd(US$)
intoEur(€)
. -
Decimals displays the default number of decimal points (degree of precision) to display. To see it in action, change the Decimals selection and observe the change in the visualization.
For example, change this:
To this:
-
Suffix displays the optional suffix to display after the unit. To see it in action, enter a string and observe the change in the visualization.
-
To reset to defaults (discard override settings for the selected metric), select the trash can next to the metric.