Skip to content

Commit f35b9a9

Browse files
authored
Docs: pie chart visualization refactor (#97701)
1 parent d1027bf commit f35b9a9

File tree

1 file changed

+47
-73
lines changed
  • docs/sources/panels-visualizations/visualizations/pie-chart

1 file changed

+47
-73
lines changed

docs/sources/panels-visualizations/visualizations/pie-chart/index.md

Lines changed: 47 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ refs:
1919
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/calculation-types/
2020
- pattern: /docs/grafana-cloud/
2121
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/calculation-types/
22+
configure-legends:
23+
- pattern: /docs/grafana/
24+
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-legend/
25+
- pattern: /docs/grafana-cloud/
26+
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-legend/
2227
---
2328

2429
# Pie chart
2530

2631
A pie chart is a graph that displays data as segments of a circle proportional to the whole, making it look like a sliced pie. Each slice corresponds to a value or measurement.
2732

28-
{{< figure src="/static/img/docs/pie-chart-panel/pie-chart-example.png" max-width="1200px" lightbox="true" alt="Pie charts" >}}
33+
![Pie chart visualizations](/media/docs/grafana/panels-visualizations/screenshot-pie-chart-v11.4.png)
2934

3035
The pie chart visualization is ideal when you have data that adds up to a total and you want to show the proportion of each value compared to other slices, as well as to the whole of the pie.
3136

@@ -98,116 +103,85 @@ If you want to display only the values from a given field (or column), once the
98103

99104
![Pie chart visualization with multiple rows and columns showing values from one column](/media/docs/grafana/panels-visualizations/screenshot-grafana-12.1-pie-example6.png)
100105

101-
## Panel options
102-
103-
{{< docs/shared lookup="visualizations/panel-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
104-
105-
## Value options
106-
107-
Use the following options to refine the value in your visualization.
108-
109-
### Show
110-
111-
Choose how much information to show.
106+
## Configuration options
112107

113-
- **Calculate -** Reduces each value to a single value per series.
114-
- **All values -** Displays every value from a single series.
108+
{{< docs/shared lookup="visualizations/config-options-intro.md" source="grafana" version="<GRAFANA_VERSION>" >}}
115109

116-
### Calculation
110+
### Panel options
117111

118-
Select a calculation to reduce each series when Calculate has been selected. For information about available calculations, refer to [Calculation types](ref:calculation-types).
112+
{{< docs/shared lookup="visualizations/panel-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
119113

120-
### Limit
114+
### Value options
121115

122-
When displaying every value from a single series, this limits the number of values displayed.
116+
Use the following options to refine the value in your visualization.
123117

124-
### Fields
118+
<!-- prettier-ignore-start -->
125119

126-
Select which field or fields to display in the visualization. Each field name is available on the list, or you can select one of the following options:
120+
| Option | Description |
121+
| ------ | ----------- |
122+
| Show | Set how much information to show. Choose from:<ul><li>**Calculate** - Reduces each value to a single value per series.</li><li>**All values** - Displays every value from a single series.</li></ul> |
123+
| Calculation | If you chose **Calculate** as your **Show** option, select a calculation to reduce each series. For information about available calculations, refer to [Calculation types](ref:calculation-types). |
124+
| Limit | If you chose **All values** as your **Show** option, enter a value to limit the number of values displayed. |
125+
| Fields | Select which field or fields to display in the visualization. Each field name is available on the list, or you can select one of the following options:<ul><li>**Numeric fields** - All fields with numerical values.</li><li>**All fields** - All fields that are not removed by transformations.</li><li>**Time** - All fields with time values.</li></ul> |
127126

128-
- **Numeric fields -** All fields with numerical values.
129-
- **All fields -** All fields that are not removed by transformations.
130-
- **Time -** All fields with time values.
127+
<!-- prettier-ignore-end -->
131128

132-
## Pie chart options
129+
### Pie chart options
133130

134131
Use these options to refine how your visualization looks.
135132

136-
### Pie chart type
137-
138-
Select the pie chart display style.
133+
#### Pie chart type
139134

140-
### Pie
135+
Select the pie chart display style. Choose from **Pie** or **Donut**.
141136

142-
![Pie type chart](/static/img/docs/pie-chart-panel/pie-type-chart-7-5.png)
137+
![Pie chart types](/media/docs/grafana/panels-visualizations/screenshot-pie-chart-types.png)
143138

144-
### Donut
145-
146-
![Donut type chart](/static/img/docs/pie-chart-panel/donut-type-chart-7-5.png)
147-
148-
### Labels
139+
#### Labels
149140

150141
Select labels to display on the pie chart. You can select more than one.
151142

152-
- **Name -** The series or field name.
153-
- **Percent -** The percentage of the whole.
154-
- **Value -** The raw numerical value.
143+
- **Name** - The series or field name.
144+
- **Percent** - The percentage of the whole.
145+
- **Value** - The raw numerical value.
155146

156147
Labels are displayed in white over the body of the chart. You might need to select darker chart colors to make them more visible. Long names or numbers might be clipped.
157148

158-
The following example shows a pie chart with **Name** and **Percent** labels displayed.
159-
160-
![Pie chart labels](/static/img/docs/pie-chart-panel/pie-chart-labels-7-5.png)
161-
162-
## Tooltip options
163-
164-
{{< docs/shared lookup="visualizations/tooltip-options-1.md" source="grafana" version="<GRAFANA_VERSION>" >}}
165-
166-
## Legend options
167-
168-
Use these settings to define how the legend appears in your visualization. For more information about the legend, refer to [Configure a legend]({{< relref "../../configure-legend" >}}).
169-
170-
### Visibility
171-
172-
Toggle the switch to turn the legend on or off.
173-
174-
### Mode
175-
176-
Use these settings to define how the legend appears in your visualization.
177-
178-
- **List -** Displays the legend as a list. This is a default display mode of the legend.
179-
- **Table -** Displays the legend as a table.
149+
The following example shows a pie chart with **Name** and **Percent** labels displayed:
180150

181-
### Placement
151+
{{< figure src="/static/img/docs/pie-chart-panel/pie-chart-labels-7-5.png" alt="Pie chart labels" max-width="350px" >}}
182152

183-
Choose where to display the legend.
153+
### Tooltip options
184154

185-
- **Bottom -** Below the graph.
186-
- **Right -** To the right of the graph.
155+
{{< docs/shared lookup="visualizations/tooltip-options-1.md" source="grafana" version="<GRAFANA_VERSION>" leveloffset="+1" >}}
187156

188-
#### Width
157+
### Legend options
189158

190-
Control how wide the legend is when placed on the right side of the visualization. This option is only displayed if you set the legend placement to **Right**.
159+
Use these settings to define how the legend appears in your visualization. For more information about the legend, refer to [Configure a legend](ref:configure-legends).
191160

192-
### Values
161+
<!-- prettier-ignore-start -->
193162

194-
Select values to display in the legend. You can select more than one.
163+
| Option | Description |
164+
| ------ | ----------- |
165+
| Visibility | Toggle the switch to turn the legend on or off. |
166+
| Mode | Use these settings to define how the legend appears in your visualization. Choose from:<ul><li>**List** - Displays the legend as a list. This is a default display mode of the legend.</li><li>**Table** - Displays the legend as a table.</li></ul> |
167+
| Placement | Select where to display the legend. Choose **Bottom** or **Right**. |
168+
| Width | Control how wide the legend is when placed on the right side of the visualization. This option is only displayed if you set the legend placement to **Right**. |
169+
| Legend values | Select values to display in the legend. You can select more than one:<ul><li>**Percent** - The percentage of the whole.</li><li>**Value** - The raw numerical value.</li></ul> |
195170

196-
- **Percent:** The percentage of the whole.
197-
- **Value:** The raw numerical value.
171+
<!-- prettier-ignore-end -->
198172

199-
## Standard options
173+
### Standard options
200174

201175
{{< docs/shared lookup="visualizations/standard-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
202176

203-
## Data links
177+
### Data links
204178

205179
{{< docs/shared lookup="visualizations/datalink-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
206180

207-
## Value mappings
181+
### Value mappings
208182

209183
{{< docs/shared lookup="visualizations/value-mappings-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}
210184

211-
## Field overrides
185+
### Field overrides
212186

213187
{{< docs/shared lookup="visualizations/overrides-options.md" source="grafana" version="<GRAFANA_VERSION>" >}}

0 commit comments

Comments
 (0)