# Pie Visualization Options

**Component Reference:** Pie or @splunk/visualizations/pie

Source: `@splunk/visualization-schemas/pieOptionsSchema`

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `backgroundColor` | string | `> themes.defaultBackgroundColor` | Specify the color for the background. You may use a dataSource to apply the color. The default for enterprise light is "#ffffff". The default for enterprise dark is "#000000". The default for prisma dark is "#0b0c0e". Pattern: `^#(?:[0-9a-fA-F]{3,4}\|[0-9a-fA-F]{6}\|[0-9a-fA-F]{8})$\|^transparent$\|^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$\|^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$\|\\$(\\w+:)?([^$\|:]+?)(\\\|[\|\\w]+)?\\$` |
| `collapseExcludeZero` | boolean | `false` | Specify whether to exclude zeros and non-numeric values in the consolidated slice. |
| `collapseLabel` | string | `other` | Specify the label for the consolidated slice. |
| `collapseThreshold` | number | `0.01` | Specify the size threshold as a number between 0 and 1 (inclusive), of the whole pie at which slices collapse into one consolidated slice. |
| `label` | array<string> | `> primary \| seriesByIndex(0)` | List of string values to display the pie chart labels. Items: string |
| `labelDisplay` | string | `values` | Specify whether to display the labels, slice percentages, and/or counts. Allowed values: `values`, `valuesAndPercentage`, `count`, `valuesAndCount`, `all`, `off` |
| `labelField` | string | `> label \| getField()` | Specify the field that corresponds to the labels. |
| `legendDisplay` | string | `off` | Specify the location of the legend on the panel. Allowed values: `right`, `left`, `top`, `bottom`, `off` |
| `percentagePrecision` | number | `0` | Specify the number of decimal places to display for percentages. The minimum value is 0. The maximum value is 16. Range: min 0, max 16 |
| `resultLimit` | number | `50000` | Specify the number of data points rendered in a chart. |
| `seriesColors` | array<string> | `["#7B56DB","#009CEB","#00CDAF","#DD9900","#FF677B","#CB2196","#813193","#0051B5","#008C80","#99B100","#FFA476","#FF6ACE","#AE8CFF","#00689D","#00490A","#465D00","#9D6300","#F6540B","#FF969E","#E47BFE"]` | Specify the colors used for a series. For example, ["#FF0000", "#0000FF", "#008000"]. Items: string |
| `seriesColorsByField` | object | — | Specify the colors used for specific pie slice labels. For example: {"April": "#008000", "May": "#FFA500"}. |
| `showDonutHole` | boolean | `false` | Specify whether the pie should be a donut. |
| `splitByLayout` | string | `off` | Specify the layout method by which to display the visualization, which splits the data into individual visualizations based on a certain category. Allowed values: `off`, `trellis` |
| `trellisBackgroundColor` | string | `> themes.defaultBackgroundColor` | Specify the color used for the trellis container background by using a hexadecimal code. For example, #0000FF. Pattern: `^#(?:[0-9a-fA-F]{3,4}\|[0-9a-fA-F]{6}\|[0-9a-fA-F]{8})$\|^transparent$\|^rgb\\(\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$\|^rgba\\(\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d{1,3}%?),\\s*(\\d*(?:\\.\\d+)?)\\)$\|\\$(\\w+:)?([^$\|:]+?)(\\\|[\|\\w]+)?\\$` |
| `trellisColumns` | number | `3` | Specify the number of visualizations to display in a given row of the trellis container. The remaining visualizations will wrap accordingly. If nothing is specified, it will be auto-set based on the trellisMinColumnWidth. The minimum value is 1. Range: min 1 |
| `trellisMinColumnWidth` | number | `250` | Specify the minimum width, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling. The minimum value is 1. Range: min 1 |
| `trellisPageCount` | number | `20` | Specify the maximum number of visualizations to display in a single page in the trellis container. The remaining visualizations will paginate accordingly. The minimum value is 1. Range: min 1 |
| `trellisRowHeight` | number | `180` | Specify the height, in pixels, of each visualization in the trellis container. If the window or panel is resized, the remaining visualizations may be viewed by scrolling. The minimum value is 1. Range: min 1 |
| `trellisSortBy` | string | `result` | Specify the sort method for the individual visualizations in the trellis container. Use result to sort by search result order, or name to sort alphabetically by visualization label. Allowed values: `result`, `name` |
| `trellisSortOrder` | string | `ascending` | Specify the sort order for the individual visualizations in the trellis container. This setting applies to the sort method specified in trellisSortBy. Allowed values: `ascending`, `descending` |
| `trellisSplitBy` | string | — | Specify the field name of the column with categories used, or “aggregations”, to split the data into individual visualizations for trellis display, if applicable. If a SPL `timechart` command is used, this may default to the SPL `by` clause field. If a SPL `chart` command is used, this may default to the first string field. |
| `value` | array<number> | `> primary \| seriesByIndex(1)` | List of numerical values to power the pie chart. Items: number |
| `valueField` | string | `> value \| getField()` | Specify the field that corresponds to the data powering values. |

_Auto-generated; do not edit by hand._
