Overview
Pie and donut charts represent data values as proportional slices of a circle, where the size of each slice corresponds to the magnitude of a value relative to the whole. In pie charts, the entire circle is filled with slices, each representing a category's share of the total. In donut charts, the center of the circle is removed, leaving space for additional information, such as labels or totals, in the center.
Pie and donut charts are commonly used to depict part-to-whole relationships and compare the contributions of different categories within a dataset. They are best suited for datasets with a small number of categories and straightforward comparisons.
Connecting to Datasets
In the
Dataset section, you can select the
dataset for your pie chart. If you need to add a dataset, this can be done by selecting
New Dataset in the
Project tab.
If you are on the Pro plan, you can upload your own files (in csv format) to use as datasets, by clicking New Dataset and then Upload Dataset.
After you have selected a dataset, you can optionally enable the Prefilter Dataset switch, which lets you filter the data that is supplied to the chart. The filter is a "prefilter" because it is applied before the visualization is generated; end users are unable to adjust the filter dynamically.
Next, choose the Fields that should be used to construct the pie chart:
- Category Field: The field containing category names. Each unique value is displayed as an individual slice; any repeated values are aggregated.
- Value Field: A number, percent, currency, or measurement field corresponding to the magnitude of each category. This determines the size of each slice, with larger values resulting in proportionally larger slices.
Connecting to Filters
You can establish connections to filter elements under the Chart tab, in the Connections section, by making a selection under Filter.
A
Filter element can be styled as a series of checkboxes, a dropdown menu, or a slider. Values from the specified
Filter Field appear as individual checkboxes, dropdown menu items, or (for numeric filtering) slider values. A given chart can be connected to one or more filters, and the same filter can be connected to multiple charts or other elements.
When a filter element is connected to a chart, it dynamically controls the dataset records displayed in the chart based on the user's selections. Additionally, filter elements can inherit color formatting from a chart, provided that the chart's
Color Field is the same as the filter's
Filter Field. For more information, see the
Color Formatting section of the documentation for filter elements.
Typically, the
Filter element you connect to will use the same
Dataset as the chart element. However, this is not strictly necessary. If the filter and chart elements use different datasets, the filter will only affect the chart if the chart's dataset contains a field (column) with the same name as the
Filter Field in the filter element. In this case, the values in these fields must at least partially align for the filter to take effect. Any non-matching values between the fields will be ignored during filtering.
Annotations
In the Annotations section under the Chart tab, you can add various annotations to a chart:
Inner Annotations: When editing donut charts, you can toggle on Show Inner Label to add an annotation inside the chart's inner hole. Specify an Inner Label to add explanatory text to the annotation. Toggle on Show Total Value to display the total of all of the values in the Value Field.
Slice Annotations: Add annotations for every slice in the pie or donut chart. You can choose whether to display category names (by enabling Show Categories), whether to display slice values (by enabling Show Values), whether to add offset spacing to move them from their default location (Label Offset), and whether to move the labels from inside the slice to the outside of each slice (by enabling Move to Outside).
When labels are moved outside the chart, you can choose an alignment for the labels or use the default "Auto" alignment, which left aligns annotations between 0 and 180 degrees and right aligns those between 180 and 360 degrees.
You can also choose to hide a range of annotation values, by adding a start and end value under Hidden Annotation Values. This is typically used to hide small values, where there is insufficient space to display the annotation text.