# Creating dashboards

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

{% hint style="info" %}
This feature is in beta.
{% endhint %}

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="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2FN7IFWwhjFD7cuqrFEOH7%2Fportfolio-dash-duplicate%20(1).png?alt=media&#x26;token=7512e152-b667-4d32-a628-f0d3eb8dbd7e" alt="Duplicating a dashboard"><figcaption></figcaption></figure>

1. Retrieve your portfolio. See [#retrieving-portfolio](https://docs.sonarsource.com/sonarqube-cloud/getting-started-with-enterprise/viewing-enterprise-reports/viewing-portfolios#retrieving-portfolio "mention") for more information.
2. Go to **Dashboards** > **All 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

To create a custom dashboard from scratch:

<figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2FFsHh8xtBK31rGMkOW4xC%2Fportfolio-dash-create%20(2).png?alt=media&#x26;token=b18e747d-dd28-4d01-ab12-ca56764d37e9" alt="Creating a custom dashboard"><figcaption></figcaption></figure>

1. Retrieve your portfolio. See [#retrieving-portfolio](https://docs.sonarsource.com/sonarqube-cloud/getting-started-with-enterprise/viewing-enterprise-reports/viewing-portfolios#retrieving-portfolio "mention") for more information.
2. Go to **Dashboards** > **All 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 **All dashboards** page.
5. Click on the action menu next to the new dashboard and select **Edit dashboard** 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="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2F4Dbi0B5IrNWpmYseHOiF%2Fportfolio-dash-edit-mode.png?alt=media&#x26;token=51057f81-ef8e-4bfd-b0a3-25e519e28c12" alt=""><figcaption></figcaption></figure>

* **Add widget**: Opens a modal where you can configure the widget. See [#adding-a-widget](#adding-a-widget "mention") for details.
* **Add section**: Sections group a set of widgets together and are collapsible. See [#adding-a-section](#adding-a-section "mention") for details.
* **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="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-a4d8709285f31d1d2ea966eeb6dd16d3a63cc320%2Fdashboards-add-new-widget.png?alt=media" 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-dashboards](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/dashboards/viewing-and-managing-dashboards#viewing-dashboards "mention") 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="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2FXJfao1wI0kPUFO0hhVU2%2Fportfolio-dash-section.png?alt=media&#x26;token=1c19f626-e5da-4ac0-91f5-6206abc12a1f" alt="Adding a section"><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 [#issues](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#issues "mention")                   |
| **Security**                             |                                           |                                                                                                                                          |
| Security remediation effort              | Count, line chart                         | See [#security](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security "mention")               |
| Security hotspots                        | Count, line chart                         | See [#security-review](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security-review "mention") |
| Security hotspots reviewed               | Count, line chart                         | See [#security-review](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security-review "mention") |
| Security hotspot count                   | Donut chart, pie chart                    | See [#security-review](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security-review "mention") |
| Security rating                          | Badge                                     | See [#security](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security "mention")               |
| Security review rating                   | Badge                                     | See [#security-review](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#security-review "mention") |
| **Reliability**                          |                                           |                                                                                                                                          |
| Reliability remediation effort           | Count, line chart                         | See [#reliability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#reliability "mention")         |
| Reliability rating                       | Badge                                     | See [#reliability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#reliability "mention")         |
| **Maintainability**                      |                                           |                                                                                                                                          |
| Effort to reach maintainability rating A | Count, line chart                         | See [#maintainability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#maintainability "mention") |
| Technical debt ratio                     | Count, line chart                         | See [#maintainability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#maintainability "mention") |
| Technical dept ratio of new/changed code | Count, line chart                         | See [#maintainability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#maintainability "mention") |
| Maintainability rating                   | Badge                                     | See [#maintainability](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#maintainability "mention") |
| **Coverage**                             |                                           |                                                                                                                                          |
| Conditions to cover                      | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| Coverage by tests                        | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| Line coverage                            | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| Lines to cover                           | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| Uncovered conditions                     | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| Uncovered lines                          | Count, line chart                         | See [#coverage](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#coverage "mention")               |
| **Duplications**                         |                                           |                                                                                                                                          |
| Duplicated blocks                        | Count, line chart                         | See [#duplications](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#duplications "mention")       |
| Duplicated files                         | Count, line chart                         | See [#duplications](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#duplications "mention")       |
| Duplicated lines                         | Count, line chart                         | See [#duplications](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#duplications "mention")       |
| Duplicated lines density                 | Count, line chart                         | See [#duplications](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#duplications "mention")       |
| **Size**                                 |                                           |                                                                                                                                          |
| Comment lines                            | Count, line chart                         | See [#size](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#size "mention")                       |
| Comment lines density                    | Count, line chart                         | See [#size](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#size "mention")                       |
| Lines                                    | Count, line chart                         | See [#size](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#size "mention")                       |
| Line count                               | Donut chart, pie chart                    | See [#size](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/metric-definitions#size "mention")                       |

### Portfolio specific metrics

| Metrics              | Visualization                             | Additional information                                                                                                                                                   |
| -------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Releasability rating | Count, badge                              | See [#releasability](https://docs.sonarsource.com/sonarqube-cloud/getting-started-with-enterprise/viewing-enterprise-reports/viewing-portfolios#releasability "mention") |
| Project count        | Count, line chart, donut chart, pie chart | The number of projects in a portfolio.                                                                                                                                   |

See [#portfolio-metrics](https://docs.sonarsource.com/sonarqube-cloud/getting-started-with-enterprise/viewing-enterprise-reports/viewing-portfolios#portfolio-metrics "mention") for additional information.

## Related pages

* [](https://docs.sonarsource.com/sonarqube-cloud/managing-portfolios/portfolio-dashboards "mention")
* [viewing-and-managing-dashboards](https://docs.sonarsource.com/sonarqube-cloud/managing-portfolios/portfolio-dashboards/viewing-and-managing-dashboards "mention")
