Docs: Add pie chart docs (#31926)

* Create pie-chart-panel.md

* Update pie-chart-panel.md

* Create legend-mode.md

* Update pie-chart-panel.md

* Update _index.md

* Update pie-chart-panel.md

* Update _index.md

* Create panel-legend.md

* Update panel-legend.md

* content updates

* Update whats-new-in-v7-5.md

* Update docs/sources/whatsnew/whats-new-in-v7-5.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update pie-chart-panel.md

* Update docs/sources/panels/visualizations/panel-legend.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/visualizations/panel-legend.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update docs/sources/panels/visualizations/pie-chart-panel.md

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Update docs/sources/panels/visualizations/pie-chart-panel.md

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Update docs/sources/panels/visualizations/pie-chart-panel.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update panel-legend.md

* Update panel-legend.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
This commit is contained in:
Diana Payton 2021-03-12 10:02:55 -08:00 committed by GitHub
parent 65c1cb62a7
commit ea185327ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 142 additions and 33 deletions

View File

@ -0,0 +1,35 @@
+++
title = "Panel legend options"
weight = 50
+++
# Legend
Use the legend to adjust how a visualization displays series. This legend functionality only applies to a few panels now, but it will eventually be common to all visualizations.
This topic currently applies to the following visualizations:
- [Pie chart panel]({{< relref "pie-chart-panel.md">}})
- [Time series panel]({{< relref "time-series/_index.md" >}})
## Toggle series
To toggle a series:
Click on the series label in the legend to isolate the series in the visualization.
All other series are hidden in the visualization. The data of the hidden series is still accessible.
Use Cmd/Ctrl+click on the series label to hide the isolated series and remove the toggle.
> **Note:** This option is persistent when you save the dashboard.
![Toggle series visibility](/img/docs/legend/legend-series-toggle-7-5.png)
This creates a system override that hides the other series. You can view this override in the Overrides tab. If you delete the override, then it removes the toggle.
![Series toggle override example](/img/docs/legend/legend-series-override-7-5.png)
## Change series color
Click on the series icon (colored line beside the series label) in the legend to change selected series color.
![Change legend series color](/img/docs/legend/legend-series-color-7-5.png)

View File

@ -0,0 +1,83 @@
+++
title = "Pie chart panel"
keywords = ["grafana", "pie chart"]
weight = 850
+++
# Pie chart v2 panel
> **Note:** This documentation refers to a beta feature.
The pie chart displays reduced series, or values in a series, from one or more queries, as they relate to each other, in the form of slices of a pie. The arc length, area and central angle of a slice are all proportional to the slices value, as it relates to the sum of all values. This type of chart is best used when you want a quick comparison of a small set of values in an aesthetically pleasing form.
![Pie chart panel](/img/docs/pie-chart-panel/pie-chart-panel-7-5.png)
## Data and field options
Time series visualizations allow you to apply:
- [Data transformations]({{< relref "../transformations/_index.md" >}})
- [Field options and overrides]({{< relref "../field-options/_index.md" >}})
- [Thresholds]({{< relref "../thresholds.md" >}})
## Display options
Use the following options to refine your visualization:
### Show
Choose how much information to show.
- **Calculate -** Reduces each value to a single value per series.
- **All values -** Displays every value from a single series.
### Calculation
Select a calculation to reduce each series when Calculate has been selected. For information about available calculations, refer to the [Calculation list]({{< relref "../calculations-list.md" >}}).
### Limit
When displaying every value from a single series, this limits the number of values displayed.
### Fields
Select which field or fields to display in the visualization.
- **Numeric fields -** All fields with numerical values.
- **All fields -** All fields that are not removed by transformations.
- **Time -** All fields with time values.
- **<field name> -** Each field name is available in the list.
### Pie chart type
Select the pie chart display style.
#### Pie
![Pie type chart](/img/docs/pie-chart-panel/pie-type-chart-7-5.png)
#### Donut
![Donut type chart](/img/docs/pie-chart-panel/donut-type-chart-7-5.png)
### Labels
Select labels to display on the pie chart. You can select more than one.
- **Name -** The series or field name.
- **Percent -** The percentage of the whole.
- **Value -** The raw numerical value.
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.
The following example shows a pie chart with **Name** and **Percent** labels displayed.
![Pie chart labels](/img/docs/pie-chart-panel/pie-chart-labels-7-5.png)
{{< docs/shared "visualizations/legend-mode.md" >}}
### Legend values
Select values to display in the legend. You can select more than one.
**Percent -** The percentage of the whole.
**Value -** The raw numerical value.

View File

@ -41,39 +41,8 @@ When you hover your cursor over the graph, Grafana can display tooltips. Choose
> **Note:** Use an override to hide individual series from the tooltip.
### Legend mode
Use these settings to refine how the legend appears in your visualization.
- **List -** Displays the legend as a list. This is a default display mode of the legend.
- **Table -** Displays the legend as a table.
- **Hidden -** Hides the legend.
### Legend placement
Choose where to display the legend.
- **Bottom -** Below the graph.
- **Right -** To the right of the graph.
{{< docs/shared "visualizations/legend-mode.md" >}}
### Legend calculations
Choose which of the [standard calculations]({{< relref "../../calculations-list.md">}}) to show in the legend. You can have more than one.
## Legend options
The Time series legend has additional features.
### Toggle series
Click on the series label in the legend to isolate the series in the visualization. All other series are hidden in the visualization. The data of the hidden series is still accessible.
Cmd/Ctrl+click on the series label to hide the clicked series and remove the toggle.
> **Note:** This option is persistent when you save the dashboard.
This creates a system override that hides the other series. You can view this override in the Overrides tab. If you delete the override, then it removes the toggle.
### Change series color
Click on the series icon (colored line beside the series label) in the legend to change selected series color.

View File

@ -0,0 +1,18 @@
---
title: Legend mode and legend placement
---
### Legend mode
Use these settings to refine how the legend appears in your visualization.
- **List -** Displays the legend as a list. This is a default display mode of the legend.
- **Table -** Displays the legend as a table.
- **Hidden -** Hides the legend.
### Legend placement
Choose where to display the legend.
- **Bottom -** Below the graph.
- **Right -** To the right of the graph.

View File

@ -20,7 +20,11 @@ These features are included in the Grafana open source edition.
### Pie chart panel visualization (beta)
Grafana 7.5 adds a beta version of the next-gen pie chart panel.
Grafana 7.5 adds a beta version of the next-generation pie chart panel.
![Pie chart panel](/img/docs/pie-chart-panel/pie-chart-panel-7-5.png)
For more information, refer to [Pie chart panel]({{< relref "../panels/visualizations/pie-chart-panel.md" >}}).
### Alerting for Loki