Adding an ID as a parameter in Yandex DataLens
To provide a filter to a chart as a parameter:
Warning
If you use the new DataLens object model with workbooks and collections:
- In the left-hand panel, select
Collections and workbooks. - Open the workbook you need and select an object.
Proceed with this guide from Step 2.
-
In the left-hand panel, click
Datasets and select the dataset you need. If you do not have a dataset, create one. -
In the top-left corner, select the Fields tab.
-
To the right of the field in the same row, click
and select Copy ID. -
Open the chart you want to add a parameter to, then click
→ Copy link at the top. You can also copy the chart URL from the browser address bar. -
Add the field ID to the chart URL as a request parameter. Your link should have this format:
https://datalens.ru/wizard/yfn1k6yxud7yr-example-chart?17ecb9a1-c8a5-4811-b53e-c8229f88fcba=<value>, where:https://datalens.ru/wizard/yfn1k6yxud7yr-example-chart: Chart URL.17ecb9a1-c8a5-4811-b53e-c8229f88fcba: Field ID.<value>: One of the field values used for filtering.
Following this link will open the chart filtered by the specified field.
Chart without the parameter
Chart with the parameter
To filter the chart data, this link was generated:
https://datalens.ru/wizard/3v7xz********-temperatura?season_xw29=spring, where:
https://datalens.ru/wizard/3v7xz********-temperatura: Chart URL.season_xw29: Field ID.spring: Field value used for filtering.