---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/charts/editor/add-js-selector
  - ru/charts/editor/add-js-selector
  - href: en/charts/editor/add-js-selector.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: en/charts/editor/add-js-selector.html
title: Adding a JS selector to a dashboard
description: From this article, you will learn how to add a JS selector to a dashboard.
vcsPath: en/charts/editor/add-js-selector.md
---

# Adding a JS selector to a dashboard


To add a [selector](./widgets/controls.md) to a dashboard:

1. In the left-hand panel, click <!-- diplodoc:svg ![image](../../_assets/console-icons/layout-cells-large.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M12 3.5H8.75v3.75h4.75V5A1.5 1.5 0 0 0 12 3.5m1.5 5.25H8.75v3.75H12a1.5 1.5 0 0 0 1.5-1.5zm-6.25-1.5V3.5H4A1.5 1.5 0 0 0 2.5 5v2.25zM2.5 8.75h4.75v3.75H4A1.5 1.5 0 0 1 2.5 11zM4 2a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V5a3 3 0 0 0-3-3z" clip-rule="evenodd"/></svg> **Dashboards** and select the dashboard you need.
1. At the top of the page, click **Edit**.
1. In the panel at the bottom of the page, choose **Selector (JS)**.

   ![image](../../_assets/datalens/editor/widget-select-js.png)

1. Specify the selector parameters:

   * **Header**: To choose the selector for linking with other widgets.
   * **Source**: Sets the selector created in Editor. Choose the selector:

     {% list tabs %}

     - From the list of objects

       Click **Select** and choose a selector from the list of objects. If you have already chosen the selector, you can proceed to edit it To do this, click **Open** to the right of the selector.

     - Using a link

       Click **Specify link**. Enter the selector URL into the input field and click **OK** below.

     {% endlist %}



   * **Auto height**: Automatic widget height on the dashboard.
   * **Parameters**: Sets a list of selector parameters and their default values. For the widget to work correctly, specify the selector parameters listed on the [Params](./tabs.md#params) tab.

     ![selector-js](../../_assets/datalens/editor/selector-js-params.png)

1. Click **Save**. The widget will appear on the dashboard.
