The total slice size of a pie chart is calculated by the metrics aggregation. In the case of a pie chart, we have the following aggregations:
- Count: This aggregation is the count of documents in the selected index pattern.
- Sum: This aggregation returns the total sum of a numeric field. After choosing this option, we can only select numeric fields.
- Unique count: This aggregation returns the number of unique values for a given field.