Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex DataLens
  • Getting started
  • Practical guidelines
    • All tutorials
    • Visualizing data from a CSV file
    • Creating and publishing a chart with a map of Moscow from a CSV file
    • Analyzing a retail chain's sales from a ClickHouse database
    • Analyzing public data on road accidents in Russia
    • Analyzing sales and locations of pizzerias based on data from ClickHouse DB and Marketplace
    • Web analytics with a connection to Yandex Metrica
    • Web analytics with funnels and cohorts calculated based on Yandex Metrica data
    • Mobile app analytics based on AppMetrica data
    • Analyzing Yandex Music podcast statistics (for podcasters)
    • Visualizing data with a QL chart
    • Visualizing data using parameters
    • Visualizing Yandex Monitoring data
    • Building customer journey charts based on AppMetrica data
  • Concepts
    • Service overview
    • Organizations in DataLens
    • Connection
    • Data types
    • Datasets
      • Overview
      • Data model
      • Dataset settings
    • Charts
      • Overview
      • Chart settings
      • Measure Values and Measure Names
    • Dashboards
    • Joining data
    • Using Markdown in DataLens
    • DataLens Public
    • Calculated fields
      • Overview
      • Formula syntax
    • Parameterization
    • Marketplace
    • Backups
    • Caching
    • Quotas and limits
  • Step-by-step instructions
    • All instructions
    • Working with connections
      • Creating a ClickHouse connection
      • Creating a connection to a file
      • Creating a Google Sheets connection
      • Creating a MySQL connection
      • Creating a PostgreSQL connection
      • Creating a SQL Server connection
      • Creating a BigQuery connection
      • Creating an Oracle Database connection
      • Creating a YDB connection
      • Creating a Greenplum® connection
      • Creating a Prometheus connection
      • Creating a Yandex Monitoring connection
      • Creating a Yandex Metrica API connection
      • Creating an AppMetrica connection
      • Creating a Yandex Cloud Billing connection
      • Managing connection access
    • Working with datasets
      • Creating a dataset
      • Combining data from multiple tables
      • Creating a data field
      • Creating a calculated data field
      • Creating a default filter for new charts
      • Updating fields in datasets
      • Describing a dataset via a source SQL query
      • Managing dataset access
      • Managing access to data rows
      • Adding parameters to a dataset
    • Working with charts
      • Creating a chart
      • Creating a QL chart
      • Creating a multi-dataset chart
      • Adding a hierarchy
      • Configuring the navigator
      • Publishing a chart
      • Managing chart access
      • Adding ID as a parameter
      • Adding parameters to a chart
      • Configuring the display of null values
    • Working with dashboards
      • Creating dashboards
      • Adding charts to dashboards
      • Adding selectors to dashboards
      • Creating an alias
      • Deleting an alias field
      • Publishing dashboards
      • Managing dashboard access
      • Adding parameters to a dashboard
      • Dashboard auto-update
      • Widget display order on a mobile device
    • Working with permissions
      • Granting permissions
      • Deleting permissions
      • Request permissions
    • Working with DataLens Marketplace
      • Adding a product from Marketplace
      • Removing a product from Marketplace
      • Creating and connecting a connector (for partners)
    • Working with organizations
      • Switching between DataLens instances
  • Access management
    • Managing access to DataLens
    • Managing access at the data row level
  • Pricing policy
  • Visualization reference
    • All visualizations
    • Line chart
    • Stacked area chart
    • Normalized stacked area chart
    • Column chart
    • Normalized column chart
    • Bar chart
    • Normalized bar chart
    • Scatter chart
    • Pie chart
    • Indicator
    • Tree chart
    • Donut chart
    • Table
    • Pivot table
    • Map
      • Overview
      • Point map
      • Point map with clusters
      • Polyline map
      • Choropleth map
      • Heat map
    • Combined chart
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Array functions
      • Overview
      • ARRAY
      • ARR_AVG
      • ARR_MAX
      • ARR_MIN
      • ARR_PRODUCT
      • ARR_REMOVE
      • ARR_STR
      • ARR_SUM
      • CAST_ARR_FLOAT
      • CAST_ARR_INT
      • CAST_ARR_STR
      • CONTAINS
      • COUNT_ITEM
      • GET_ITEM
      • REPLACE
      • SLICE
      • STARTSWITH
      • UNNEST
    • Date/Time functions
      • Overview
      • DATEADD
      • DATEPART
      • DATETRUNC
      • DAY
      • DAYOFWEEK
      • HOUR
      • MINUTE
      • MONTH
      • NOW
      • QUARTER
      • SECOND
      • TODAY
      • WEEK
      • YEAR
    • Logical functions
      • Overview
      • CASE
      • IF
      • IFNULL
      • ISNULL
      • ZN
    • Mathematical functions
      • Overview
      • ABS
      • ACOS
      • ASIN
      • ATAN
      • ATAN2
      • CEILING
      • COMPARE
      • COS
      • COT
      • DEGREES
      • DIV
      • EXP
      • FLOOR
      • GREATEST
      • LEAST
      • LN
      • LOG
      • LOG10
      • PI
      • POWER
      • RADIANS
      • ROUND
      • SIGN
      • SIN
      • SQRT
      • SQUARE
      • TAN
    • Operators
      • Overview
      • AND
      • Addition and concatenation (+)
      • BETWEEN
      • Comparison
      • Division (/)
      • IN
      • IS FALSE
      • IS TRUE
      • LIKE
      • Modulo (%)
      • Multiplication (*)
      • NOT
      • Negation (-)
      • OR
      • Power (^)
      • Subtraction (-)
    • String functions
      • Overview
      • ASCII
      • CHAR
      • CONCAT
      • CONTAINS
      • ENDSWITH
      • FIND
      • ICONTAINS
      • IENDSWITH
      • ISTARTSWITH
      • LEFT
      • LEN
      • LOWER
      • LTRIM
      • REGEXP_EXTRACT
      • REGEXP_EXTRACT_NTH
      • REGEXP_MATCH
      • REGEXP_REPLACE
      • REPLACE
      • RIGHT
      • RTRIM
      • SPACE
      • SPLIT
      • STARTSWITH
      • SUBSTR
      • TRIM
      • UPPER
      • UTF8
    • Text markup functions
      • Overview
      • BOLD
      • ITALIC
      • MARKUP
      • URL
    • Time series functions
      • Overview
      • AGO
      • AT_DATE
    • Type conversion functions
      • Overview
      • BOOL
      • DATE
      • DATETIME
      • DATETIME_PARSE
      • DATE_PARSE
      • DB_CAST
      • FLOAT
      • GEOPOINT
      • GEOPOLYGON
      • INT
      • STR
    • Window functions
      • Overview
      • AVG
      • AVG_IF
      • COUNT
      • COUNT_IF
      • FIRST
      • LAG
      • LAST
      • MAVG
      • MAX
      • MCOUNT
      • MIN
      • MMAX
      • MMIN
      • MSUM
      • RANK
      • RANK_DENSE
      • RANK_PERCENTILE
      • RANK_UNIQUE
      • RAVG
      • RCOUNT
      • RMAX
      • RMIN
      • RSUM
      • SUM
      • SUM_IF
    • Function Availability
  • Function tutorials
    • Aggregate functions
    • Window functions
    • LOD expressions and filtering in aggregate functions
  • Public materials
    • Educational projects
    • Webinars and conferences
    • Articles and publications
    • Public dashboards and charts
  • Troubleshooting
    • Questions and answers
    • DataLens errors
  1. Concepts
  2. Charts
  3. Overview

Charts

Written by
Yandex Cloud
  • Dataset-based charts
    • Multi-dataset charts
  • QL charts
  • Chart types
  • Versioning
    • Version types
    • Creating a new version
    • Limitations
  • Publishing a chart
  • Access management

Charts are the visualization of data from a dataset in the form of a table, diagram, or map.

DataLens includes two types of charts:

  • Dataset-based charts
  • QL charts

Dataset-based charts

Charts are created in a wizard based on data from one or more datasets (see multi-dataset charts).
You can create an unlimited number of charts based on a single dataset.

The workspace in the wizard interface is divided into three main panels:

  1. A dataset panel where available fields are displayed: Dimensions and Measures. You can add a calculated field to the list.
  2. A visualization setup panel that you can use to select a chart type. Each type has its own set of sections (such as X-axis, Y-axis, and filters) where you can drag and drop fields. For more information, see Chart settings.
  3. A preview panel where the visualization is displayed.

Charts let you quickly analyze and test hypotheses. You can also save charts and add them to dashboards as widgets.

Warning

DataLens limits the number of data rows displayed in charts. For more information, see Quotas and limits in DataLens.

Multi-dataset charts

Multi-dataset charts display data from multiple datasets.

Queries for each dataset are processed independently of each other. You cannot create calculated fields from fields in multiple datasets.
When you add a second DataLens dataset, a link is automatically created based on the first match for the field name and field data type.

In this case, you can:

  • Change links.
  • Add new links.
  • Delete links.

Note

Datas in a chart don't have to be linked.

Features of working with linked datasets in charts, except for geochart layers:

  • One chart can use any measures from datasets, regardless of their links.
  • One chart can only use linked dimensions.
  • Filters by linked dimensions are applied to all datasets.
  • Filters by non-linked dimensions are applied only to their own dataset.

Features of working with linked datasets in geovisualizations on different layers:

  • A geolayer can use any measures from datasets regardless of their links
  • A geolayer can only use its linked dimensions.
  • Filters by linked dimensions from the General filters section are applied to all datasets in all layers.
  • Filters from the General filters section that use non-linked dimensions only apply to their own dataset in all layers.
  • Filters in the Layer filters section that use linked dimensions apply to all datasets within the current layer.
  • Filters in the Layer filters section that use non-linked dimensions only apply to their own dataset within the current layer.
  • There are no restrictions on using non-linked dimensions in different layers.

QL charts

QL charts are charts created from a connection if the connection source is a database, Prometheus, or Monitoring. To create such charts, direct queries to the source are used. Depending on the chart type, the query can be run in the source database's SQL dialect, as well as the Prometheus or Monitoring query languages. This helps you to expand visualization capabilities by using language-specific transactions.

Running a query does not create a separate Dataset object: a chart is generated on the fly and displayed in the preview panel.

Unlike dataset-based charts, the logic of a visualization area in QL charts favors queries against the source, that is, the visualization area only displays the data queried.

The following types of QL charts are supported:

  • SQL. They let you build visualizations with flexible dataset management based on parameterization of an SQL query to the source DB.

    SQL chart specifics:

    • Reduce database workload by using direct queries.

    • Are only suitable for SELECT queries.

    • Enable the use of JOIN, GROUP BY, and SORT BY queries and aggregate functions in SQL queries.

    • Enable the parameterization of any part of a SQL query.

    • Support a limited set of visualizations types.

    • They do not support RLS and calculated fields.

      Query example for a ClickHouse database
      SELECT Category, Month, ROUND(SUM(Sales))
      FROM samples.SampleLite
      WHERE Category in {{category}} -- a variable used in the selector
      GROUP BY Category, Month -- grouping by category and month
      ORDER BY Category, Month -- sorting by category and month
      
  • Prometheus. They let you create a chart based on Prometheus data (see the example). You can't build a dataset on top of this source. You can only work with it using QL charts.

  • Monitoring. They let you create a chart based on Yandex Monitoring data (see the example). You can't build a dataset on top of this source. You can only work with it using QL charts. You can also export a chart from Monitoring to DataLens. You can edit, save, and place it on a dashboard.

To create a QL chart, see the instructions.

Chart types

You can find all the Yandex DataLens chart types in the Visualization reference.

Versioning

Chart versioning is the ability to store the history of chart configuration changes using versions. A list of versions is available to users with the lowest level of Read access to the chart.

Note

Currently, versioning is only supported for dataset-based charts.

To go to the list of versions, click the icon at the top of the screen and select Change history.

image

To select a version from the list, click it. The version number will be displayed as the value of the revId parameter in the chart address string. Clicking on a link with the version number in the revId parameter will open the relevant version of the chart directly.

Version types

The following distinct versions are available:

  • Actual. The most recently saved version of a chart. All users can see chart versions on dashboards, as well as when directly navigating to charts or opening them for editing from the dashboard context menu. Only one version of a chart can be actual.

    image

    If a user has Write permissions, they can make any chart version actual.

    Warning

    When updating any version, except a draft, a new chart version is created.

  • Draft. A version with unsaved chart changes. The main users do not see changes being made to a draft. This enables you to hide chart edits until a version update. A chart can only have one draft.

    image

    To create a draft after editing a chart, click the down arrow in the upper-right corner and select Save as draft.

  • Not actual. A version that is neither actual nor a draft.

    image

Tip

You can share a version of a chart. For this, pass the revision number in the revId parameter in a link (such as ?revId=zac5m4edoaqqr).

Creating a new version

A new version is automatically created when you click Save and make actual in chart edit mode. Here are the chart configuration changes that result in a new version:

  • Changing chart settings that can be accessed by clicking at the top of the screen.
  • Adding, renaming, or deleting chart fields.
  • Adding or deleting fields in chart sections.

Limitations

  • The change history only contains a list of chart versions and includes: version type, save date and time, and the author of the edits.
  • Chart versions don't include changes to access permissions (this operation is performed separately from chart edits).
  • Versions do not display a list of changes. You can only view the saved status of the chart configuration.

Publishing a chart

You can grant any internet user access to a chart using DataLens Public. This chart becomes public and any user can view it without authorization.

Granting public access to a chart increases the number of DB queries, so keep in mind that the load on the database will increase.

To grant public access to a chart:

Warning

Before publishing any data, make sure that your charts and dashboards don't contain any personal data or trade secrets. Access to published data is not restricted.

  1. On the navigation page, find the chart and open it.
  2. At the top of the wizard interface, click .
  3. In the window that opens, enable Access via link. DataLens automatically grants access to related objects.
  4. Copy the public link and click Apply.

Access management

You can configure chart permissions.

To configure chart permissions:

  1. On the navigation page, find the chart that you want to change permissions for.
  2. On the right side, click and select Configure access.
  3. Enter the username in the Add participants field and click Select.
  4. In the window that opens, select the permission type and click Add.

For more information about types of permissions, see Managing access to DataLens.

See also

  • Creating a chart
  • Creating a QL chart
  • Visualization reference
  • Publishing a chart

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Dataset-based charts
  • Multi-dataset charts
  • QL charts
  • Chart types
  • Versioning
  • Version types
  • Creating a new version
  • Limitations
  • Publishing a chart
  • Access management