docs/sources/visualizations/dashboards/build-dashboards/create-dashboard/_index.md
Dashboards and panels allow you to show your data in visual form. Each panel needs at least one query to display a visualization.
Before you begin:
To create a dashboard, follow these steps:
{{< docs/list >}}
{{< shared id="create-dashboard" >}}
Click Dashboards in the main menu.
Click New and select New Dashboard.
Click the Add new element icon (blue plus sign) and click or drag a panel onto the dashboard.
{{< figure src="/media/docs/grafana/dashboards/screenshot-empty-dashboard-v13.0.png" max-width="750px" alt="Empty dashboard with sidebar open" >}}
{{< /shared >}}
On the new panel, select one of the following options:
Configure visualization: Opens panel edit mode with the default data source for your instance preselected. Configure a query and set panel and visualization options.
Use saved query: Opens the Saved queries drawer. Select a query, and Grafana adds the panel with suggested visualization applied.
Then, go to step 12.
Use library panel: Opens a drawer with a list of library panels. Select a library panel, and Grafana adds the panel.
Then, go to step 12.
{{< admonition type="note" >}} Saved queries is currently in public preview in Grafana Enterprise and Grafana Cloud only. {{< /admonition >}}
If you want to change the panel data source, in the Queries tab, click the Data source drop-down list and do one of the following:
For more information about data sources, refer to Data sources for specific guidelines.
To create a query, do one of the following:
(Optional) To save the query for reuse, click the Saved queries drop-down menu and select Save query.
Click Refresh to query the data source.
Select a suggested visualization or click All visualizations and select one from the full list.
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-viz-suggestion-2-v13.0.png" max-width="300px" alt="Visualization selector" >}}
Grafana displays a preview of your query results with the visualization applied.
For more information about configuring individual visualizations, refer to Visualizations options.
(Optional) If the panel supports it, choose an option from the Panel styles section in the panel editor sidebar. Each style shows a live preview of how it changes the visualization. Clicking a style applies it to the panel.
{{< admonition type="note" >}}
Panel styles is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available. Enable the vizPresets feature toggle to use this feature.
{{< /admonition >}}
For more information about Panel styles, refer to the Panel editor documentation.
Refer to the following documentation for ways you can adjust panel settings.
While not required, most visualizations need some adjustment before they properly display the information that you need.
Enter a title and description for the panel or have Grafana create them using generative AI features.
Click Save.
Enter a title and description for the dashboard or have Grafana create them using generative AI features.
Select a folder, if applicable.
Click Save
Click Exit edit.
{{< /docs/list >}}
Now that you've created a basic dashboard, you can augment it with more options, which is explained in the following sections:
The sidebar allows you to make changes without leaving the dashboard, by displaying options associated with the part of the dashboard that's in focus. The toolbar is next to the sidebar, and it includes options that are useful to have available all the time.
The following image shows the parts of the sidebar and the toolbar. Hover your cursor over the numbers to display descriptions of the toolbar options (descriptions also follow the image):
{{< image-map key="sidebar-toolbar" >}}
The toolbar is displayed in both edit and view mode, but the Dashboard options and Feedback icons aren't available in view mode.
The available configuration options in the sidebar differ depending on the selected dashboard element:
You can close the sidebar by clicking the following icons in the toolbar a second time:
You can choose to use the sidebar docked or undocked by clicking the Dock/Undock icon in the toolbar. When the sidebar is docked, the content of the dashboard resizes to accommodate the sidebar. When it's undocked, the sidebar floats on top of the dashboard content. In edit mode, the sidebar is docked by default and in view mode, it's undocked.
{{< admonition type="note" >}} On mobile devices, the sidebar is docked by default in edit mode. {{< /admonition >}}
The following table describes how the sidebar behaves when docked or undocked in edit mode:
<!-- prettier-ignore-start -->| Docked | Undocked |
|---|---|
| After the sidebar is open, it remains open regardless of where you click. | The sidebar closes if you don't select a dashboard element. |
| The sidebar displays dashboard options when you click the dashboard canvas. | The sidebar only displays dashboard options when you click the Dashboard options icon. |
When you dock or undock the sidebar, your choice is persisted for all dashboards you use in that Grafana instance, across sessions, by way of your browser's local storage. You can clear this selection by clearing the following keys in your local storage:
grafana.ui.sidebar.dashboard-view.dockedgrafana.ui.sidebar.dashboard.docked{{< video-embed src="/media/docs/grafana/dashboards/screenrecord-sidebar-toolbar-v13.0.mp4" >}}
You can also resize the sidebar and toolbar. You can only resize the toolbar when the sidebar is closed, however, you can do so in view or edit mode. Your resizing changes persist until you change them.
The Content outline provides a tree-like structure that shows you all the parts of the dashboard and their relationships to each other, including panels, rows, tabs, and variables. The outline also lets you quickly navigate the dashboard and is available in both view and edit modes (note that variables are only included in edit mode).
{{< figure src="/media/docs/grafana/dashboards/screenshot-content-outline-v12.4.png" max-width="750px" alt="Dashboard with outline open" >}}
To navigate the dashboard using the outline, follow these steps:
To edit a dashboard, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Do one of the following:
| Update | Action |
|---|---|
| Edit existing elements | <p>Click the element to open the sidebar showing the relevant options. Click the Dashboard options icon to access dashboard settings.</p><p>If the dashboard is large, open the Content outline and use it to navigate to the part of the dashboard you want to update.</p> |
| Add more panels | <p>Click the Add new element icon and select Panel.</p><p>You can also hover your cursor on the dashboard to display the Add panel button. This is helpful if you want to ensure that you add a new panel within a grouping.</p> |
| Group panels | <p>Click Add new element and select Group into row or Group into tab.</p><p>Alternatively hover your cursor on the dashboard to display the Group panels and select a grouping option.</p><p>For more information on groupings, refer to Panel groupings.</p> |
| Add dashboard controls | Click Add new element and select one of the following: <ul><li>Variable</li><li>Annotation query</li><li>Links</li></ul> |
| Change layouts | Click a row, tab, or the Dashboard options icon to open the sidebar and access layout options. For more information, refer to panel layout options. |
When you've finished making changes, click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Back to dashboard, if needed.
Click Exit edit
Panel layouts control the size and arrangement of panels in the dashboard. There are two panel layout options:
When you first create a dashboard, you select a layout and that selection becomes your the default for rows and tabs that you add to the dashboard. However, you can change this default in the dashboard settings.
In the auto grid layout, panels are automatically sized and positioned as you add them. There are default parameters to constrain the layout, and you can update these to have more control over the display:
To update the panel layout, follow these steps:
You can configure Grafana to dynamically add panels, rows, or tabs to a dashboard based on the value of a variable. Variables dynamically change your queries across all panels, rows, or tabs in a dashboard.
This only applies to queries that include a multi-value variable.
To configure repeats, follow these steps:
{{< docs/list >}}
Navigate to the dashboard you want to update.
Click Edit.
Click the panel, row, or tab you want to update to open the sidebar, or click the Dashboard options icon to open it.
If the dashboard is large, open the Content outline and use it to navigate to the part of the dashboard you want to update.
{{< shared id="configure-repeat" >}}
Expand the Repeat options section.
Select the Repeat by variable.
For panels in a custom layout, set the following options:
(Optional) To provide context to dashboard users, add the variable name to the panel, row, or tab title.
When you've finished setting the repeat option, click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit.
{{< /shared >}}
{{< /docs/list >}}
If a row includes panels using the special Dashboard data source—the data source that uses a result set from another panel in the same dashboard—then corresponding panels in repeated rows will reference the panel in the original row, not the ones in the repeated rows. The same behavior applies to tabs.
For example, in a dashboard:
Row 1 includes Panel 1A and Panel 1BPanel 1B uses the results from Panel 1A by way of the -- Dashboard -- data sourceRow 2, includes Panel 2A and Panel 2BPanel 2B references Panel 1A, not Panel 2AYou can configure panels, rows, and tabs to be shown or hidden based on rules. For example, you can set a panel to be hidden if there's no data returned by a query or a tab to only be shown if a specific variable value is present.
There are three types of show/hide rules to choose from:
For steps on how to create show/hide rules, refer to Configure show/hide rules.
{{< admonition type="note" >}} You can only configure show/hide rules for panels in the Auto grid layout. Set the panel layout at the dashboard, row, or tab-level. {{< /admonition >}}
Show or hide a panel based on whether or not the query returns any results. The rule provides Has data and No data options, so you can choose to show or hide the panel based on the presence or absence of data.
For example, if you have a dashboard with several panels and only want panels that return data to appear, set the rule as follows:
Alternatively, you might also want to troubleshoot a dashboard with several panels to see which ones contain broken queries that aren't returning any results. In this case, you'd set the rule as follows:
Show or hide a panel, row, or tab dynamically based on the variable value. You can select any variable that's configured for the dashboard and choose from the following operators for maximum flexibility:
You can add more variables if you need to without leaving the dashboard.
Show or hide a panel, row, or tab if the dashboard time range is shorter than the selected time range. This ensures that as you change the time range of the dashboard, you only see data relevant to that time period.
For example, a dashboard is tracking adoption of a feature over time has the following setup:
For the panel tracking weekly stats, a rule is set up to hide it if the dashboard time range is less than 7 days. For the panel tracking daily stats, a rule is set up to hide it if the dashboard time range is less 24 hours. This configuration ensures that these time-based panels are only displayed when enough time has passed to make them relevant.
For this rule type, you can select time ranges from 5 minutes to 5 years.
To configure show/hide rules, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Click the panel, row, or tab you want to update to open the sidebar, or click the Dashboard options icon to open it.
If the dashboard is large, open the Content outline and use it to navigate to the part of the dashboard you want to update.
Expand the Show / hide rules section.
Select Show or Hide to set whether the panel, row, or tab is shown or hidden based on the rules outcome.
Click + Add rule.
Select a rule type:
If you've configured more than rule, under Match rules, select one of the following:
This option is only displayed if you add multiple rules.
When you've finished setting rules, click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit
Hidden panels, rows, or tabs aren't visible when the dashboard is in view mode. In edit mode, hidden dashboard elements are displayed with an icon or overlay indicating this.
To move a panel, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Navigate to the panel you want to move.
If the dashboard is large, open the Content outline and use it to navigate to the panel.
Click the panel title and drag the panel to another row or tab, or to a new position on the dashboard.
If the dashboard has groupings, you can only move the panel to another grouping.
When the new position is highlighted in a solid blue line, drop the panel.
Click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit
When your dashboard or grouping has a Custom layout, you can manually resize a panel.
To resize a panel, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Navigate to the panel you want to resize.
If the dashboard is large, open the Content outline and use it to navigate to the panel.
Click and drag the lower-right corner of the panel to change the size of the panel.
Click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit.
You can copy and paste or duplicate the following dashboard elements:
To copy or duplicate dashboard elements, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Click the panel, row, or tab you want to update to open the sidebar, or click the Dashboard options icon to open it.
If the dashboard is large, open the Content outline and use it to navigate to the part of the dashboard you want to update.
In the top-corner of the sidebar, click the Copy or Duplicate icon and do one of the following:
If you selected Copy, navigate to the part of the dashboard where you want to add the copied element, and click Paste panel, Paste row, or Paste tab.
Update the copied or duplicated element if needed.
Click Save.
(Optional) Enter a description of the changes you've made.
Click Save.
Click Exit edit
To make a copy of a dashboard, follow these steps:
Navigate to the dashboard you want to update.
Click Edit.
Click the Save drop-down list and select Save as copy.
(Optional) Specify the name, folder, description, and whether or not to copy the original dashboard tags for the copied dashboard.
By default, the copied dashboard has the same name as the original dashboard with the word "Copy" appended and is in the same folder.
Click Save.