From acae73679645753e467d3c54ea6cadfd8e6664fe Mon Sep 17 00:00:00 2001 From: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Date: Tue, 9 Aug 2022 14:41:41 -0500 Subject: [PATCH] moves legend to visualizations, adds links (#53486) --- docs/sources/visualizations/bar-chart.md | 4 +++- .../configure-legend/index.md} | 20 ++++--------------- .../sources/visualizations/pie-chart-panel.md | 6 ++++-- .../visualizations/time-series/_index.md | 2 ++ 4 files changed, 13 insertions(+), 19 deletions(-) rename docs/sources/{panels/working-with-panels/configure-legend.md => visualizations/configure-legend/index.md} (86%) diff --git a/docs/sources/visualizations/bar-chart.md b/docs/sources/visualizations/bar-chart.md index b03d53d07b8..bd2bbd6fc21 100644 --- a/docs/sources/visualizations/bar-chart.md +++ b/docs/sources/visualizations/bar-chart.md @@ -21,7 +21,7 @@ This panel visualization allows you to graph categorical data. ## Supported data formats -Only one data frame is supported and it needs to have at least one string field that will be used as the category for an X or Y axis and one or more numerical fields. +Only one data frame is supported and it must have at least one string field that will be used as the category for an X or Y axis and one or more numerical fields. Example: @@ -107,6 +107,8 @@ Gradient color is generated based on the hue of the line color. Choose which of the [standard calculations]({{< relref "../panels/calculation-types/" >}}) to show in the legend. You can have more than one. +For more information about the legend, refer to [Configure a legend](../configure-legend/). + ## Text size Enter a **Value** to change the size of the text on your bar chart. diff --git a/docs/sources/panels/working-with-panels/configure-legend.md b/docs/sources/visualizations/configure-legend/index.md similarity index 86% rename from docs/sources/panels/working-with-panels/configure-legend.md rename to docs/sources/visualizations/configure-legend/index.md index 008bd996556..13cf950969d 100644 --- a/docs/sources/panels/working-with-panels/configure-legend.md +++ b/docs/sources/visualizations/configure-legend/index.md @@ -3,7 +3,7 @@ aliases: - /docs/grafana/latest/panels/working-with-panels/configure-legend/ - /docs/sources/panels/working-with-panels/configure-legend/ title: Configure a legend -weight: 70 +weight: 1300 --- # Configure a legend @@ -41,13 +41,7 @@ This topic currently applies to the following visualizations: As way to add more context to a visualization, you can add series data values to a legend. You can add as many values as you'd like; after you apply your changes, you can horizontally scroll the legend to see all values. -### Before you begin - -- Add a panel - -**To add values to a legend**: - -1. Open a panel. +1. Edit a panel. 1. In the panel display options pane, locate the **Legend** section. @@ -61,13 +55,7 @@ As way to add more context to a visualization, you can add series data values to By default, Grafana specifies the color of your series data, which you can change. -### Before you begin - -- Add a panel - -**To change a series color, perform the following steps**: - -1. Open the panel. +1. Edit a panel. 1. In the legend, click the color bar associated with the series. @@ -79,7 +67,7 @@ By default, Grafana specifies the color of your series data, which you can chang ## Sort series -Change legend mode to **Table** and choose [calculations]({{< relref "../calculation-types/" >}}) to be displayed in the legend. Click the calculation name header in the legend table to sort the values in the table in ascending or descending order. +You can change legend mode to **Table** and choose [calculations]({{< relref "../../panels/calculation-types/" >}}) to be displayed in the legend. Click the calculation name header in the legend table to sort the values in the table in ascending or descending order. The sort order affects the positions of the bars in the Bar chart panel as well as the order of stacked series in the Time series and Bar chart panels. diff --git a/docs/sources/visualizations/pie-chart-panel.md b/docs/sources/visualizations/pie-chart-panel.md index a83c5e3a7f5..103e45baa66 100644 --- a/docs/sources/visualizations/pie-chart-panel.md +++ b/docs/sources/visualizations/pie-chart-panel.md @@ -80,5 +80,7 @@ The following example shows a pie chart with **Name** and **Percent** labels dis Select values to display in the legend. You can select more than one. -**Percent -** The percentage of the whole. -**Value -** The raw numerical value. +- **Percent:** The percentage of the whole. +- **Value:** The raw numerical value. + +For more information about the legend, refer to [Configure a legend](../configure-legend/). diff --git a/docs/sources/visualizations/time-series/_index.md b/docs/sources/visualizations/time-series/_index.md index fa215ddf346..45a394ccdde 100644 --- a/docs/sources/visualizations/time-series/_index.md +++ b/docs/sources/visualizations/time-series/_index.md @@ -33,6 +33,8 @@ These options are available whether you are graphing your time series as lines, Choose which of the [standard calculations]({{< relref "../../panels/calculation-types/" >}}) to show in the legend. You can have more than one. +For more information about the legend, refer to [Configure a legend](../configure-legend/). + ## Graph styles Use these options to choose how to display your time series data.