# Creating dashboards

This feature is available in the [Enterprise](https://www.sonarsource.com/plans-and-pricing/sonarcloud/) plan.

There are two ways to create a custom dashboard, by duplicating an existing dashboard or by creating one from scratch.

## Duplicating an existing dashboard

You can duplicate an existing dashboard and use it as a starting point. Sometimes, this is the fastest way to get started.

<figure><img src="/files/rCKaHS0pgpmdPh1S0hls" alt="duplicating a dashboard on All dashboards page"><figcaption></figcaption></figure>

1. Retrieve your project. See [Retrieving projects](/sonarqube-cloud/managing-your-projects/retrieving-projects.md) for more information.
2. Go to **Dashboards**. The dashboards page opens with all available dashboards.
3. Click on the action menu next to the existing dashboard and select **Duplicate**. You can only duplicate custom dashboards.
4. In the **Duplicate dashboard** modal enter the dashboard name, description and click **Create duplicate**. The new dashboard appears on the All dashboards page.
5. Click on the action menu next to the duplicated dashboard and select **Edit dashboard** to customize it.

## Creating a custom dashboard from scratch

<figure><img src="/files/ziZ1RjDVAUWDFfdNEjMQ" alt="Creating a new custom dashboard"><figcaption></figcaption></figure>

To create a custom dashboard from scratch:

1. Retrieve your project. See [Retrieving projects](/sonarqube-cloud/managing-your-projects/retrieving-projects.md) for more information.
2. Go to **Dashboards.**
3. Click **Create custom dashboard** button in the top right corner.
4. In the **Create custom dashboard** modal enter the dashboard name, description and click **Create**. The new dashboard appears on the **Dashboards** page.
5. Click on the action menu next to the new dashboard and select **Edit** to customize it.

Once you are in the edit mode you can select the following option at the top of the page:

<figure><img src="/files/McvIeOAiIYAU9HqvsEK2" alt="Dashboards editing options"><figcaption></figcaption></figure>

* **Add widget**: Opens a modal where you can configure the widget. See [#adding-a-widget](#adding-a-widget "mention").
* **Add section**: Sections group a set of widgets together and are collapsible. See [#adding-sections](#adding-sections "mention")
* **Cancel and exit**: Exits the edit mode without saving the changes.
* **Save changes**: Saves the current changes.

## Adding a widget

In the dashboard’s edit mode, click **Add widget** to open a modal. In the **Add new widget** modal follow these steps:

<div align="left"><figure><img src="/files/fCoU7H2YFEfK1YcpsD19" alt="Configuring a new widget"><figcaption></figcaption></figure></div>

{% stepper %}
{% step %}
**Define your widget**

* **Visualization**: Choose the visualization that will represent the data. The options are: **Count**, **Badge**, **Line chart**, **Donut chart**, and **Pie chart**. See [Viewing and managing dashboards](/sonarqube-cloud/managing-your-projects/dashboards/viewing-and-managing-dashboards.md#viewing-dashboards) for more information about the chart options.
* **Metric**: Choose the metric you want to visualize. The metric drop-down list is filtered by metrics available for the visualization you have selected. See [#metrics](#metrics "mention") for a list of available metrics and associated visualizations.
* **Slice by**: This option appears only for pie and donut charts. Available options depend on the metric you have chosen.
  {% endstep %}

{% step %}
**Apply filters**

Depending on the metric you have selected in the previous step, appropriate filters are displayed. Feel free to explore the filters and combine them with various metrics to find the desired results.

* **Scope**: For the count, rating badge, pie, and donut chart visualizations, you can choose between **Overall code** or **New code**. For the line chart, **Overall code** is the only option and is applied by default.
* **Time range**: This option appears only for the line chart because it is a time-based chart. The options are: **All**, **Last 3 months**, and **Last month**.
* Additional filters appear that are relevant to the visualization and metric you selected in the previous step.
  {% endstep %}

{% step %}
**Customize visualization**

* **Show legend**: Select this option to display a legend for a visualization. This applies to the line, donut and pie charts.
* **Show trend indicator**: Available only to the count visualization.
  {% endstep %}
  {% endstepper %}

Once you are done configuring the widget:

* Click **Add to dashboard** at the bottom of the modal.
* Click **Save changes** at the top of the dashboard page, if you are done editing.

## Adding a section

Sections help you organize and group your widgets on a dashboard.

To create a section:

* Enter the edit mode and click **Add section** to open a modal.
* Enter the section name and description in the modal.
* Click **Create section** to add it to the dashboard.

<figure><img src="/files/0I8joAE4FyGnyKV50MPz" alt="Options for a section element"><figcaption></figcaption></figure>

1. Once the section appears on a dashboard, you can move it by clicking the handle located in the upper-left corner and dragging it to another location.
2. Click **Add widget** to add a new widget directly from within the section.
3. Click the action menu located in the upper right corner of the section to edit or delete the section.
4. **Collapse** or **Expand** the section to change its visibility. This feature works even after you save the changes and exit edit mode.
5. Click **Save changes** at the top of the page when you are done.

## Metrics

The following table shows a list of metrics and associated visualizations.

| Metrics                                  | Visualization                             | Additional information                                                                                                  |
| ---------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Issues**                               |                                           |                                                                                                                         |
| Issue count                              | Count, line chart, donut chart, pie chart | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#issues)          |
| **Security**                             |                                           |                                                                                                                         |
| Security remediation effort              | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security)        |
| Security hotspots                        | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security-review) |
| Security hotspots reviewed               | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security-review) |
| Security hotspot count                   | Donut chart, pie chart                    | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security-review) |
| Security rating                          | Badge                                     | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security)        |
| Security review rating                   | Badge                                     | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#security-review) |
| **Reliability**                          |                                           |                                                                                                                         |
| Reliability remediation effort           | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#reliability)     |
| Reliability rating                       | Badge                                     | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#reliability)     |
| **Maintainability**                      |                                           |                                                                                                                         |
| Effort to reach maintainability rating A | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#maintainability) |
| Technical debt ratio                     | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#maintainability) |
| Technical dept ratio of new/changed code | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#maintainability) |
| Maintainability rating                   | Badge                                     | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#maintainability) |
| **Coverage**                             |                                           |                                                                                                                         |
| Conditions to cover                      | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| Coverage by tests                        | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| Line coverage                            | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| Lines to cover                           | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| Uncovered conditions                     | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| Uncovered lines                          | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#coverage)        |
| **Duplications**                         |                                           |                                                                                                                         |
| Duplicated blocks                        | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#duplications)    |
| Duplicated files                         | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#duplications)    |
| Duplicated lines                         | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#duplications)    |
| Duplicated lines density                 | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#duplications)    |
| **Size**                                 |                                           |                                                                                                                         |
| Comment lines                            | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#size)            |
| Comment lines density                    | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#size)            |
| Lines                                    | Count, line chart                         | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#size)            |
| Line count                               | Donut chart, pie chart                    | See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md#size)            |

## Related pages

* [Project dashboards](/sonarqube-cloud/managing-your-projects/dashboards.md)
* [Viewing and managing dashboards](/sonarqube-cloud/managing-your-projects/dashboards/viewing-and-managing-dashboards.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/dashboards/creating-dashboards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
