Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex DataLens
    • Overview
      • All visualizations
      • Line chart
      • Area chart
      • Normalized stacked area chart
      • Column chart
      • Normalized column chart
      • Bar chart
      • Normalized bar chart
      • Scatter chart
      • Pie chart
      • Combined chart
      • Tree chart
      • Donut chart
      • Table
      • Pivot table
      • Indicator
    • Versioning
    • Chart inspector
    • Access management
  • Audit Trails events

In this article:

  • Types of bar charts
  • Grouped
  • Stacked
  • Wizard sections
  • Creating a bar chart
  • Creating a grouped bar chart
  • Adding a column color based on a measure
  • Configuring display of null values
  • Recommendations
  1. Charts
  2. Visualization reference
  3. Bar chart

Bar chart

Written by
Yandex Cloud
Updated at March 6, 2025
  • Types of bar charts
    • Grouped
    • Stacked
  • Wizard sections
  • Creating a bar chart
    • Creating a grouped bar chart
    • Adding a column color based on a measure
    • Configuring display of null values
  • Recommendations

This chart displays the values of one or more measures by each category, using horizontal bars. The length of a bar determines the measure value: the longer the bar, the larger the value. For example, you can compare sales of products by their subcategory.

horizontal-bar-chart

Source table
Subcategory Sales
Beauty and health products 44K
Kitchenware 1392K
Kitchen products 1120K
Detergents 405K
Health and beauty equipment 1760K
Non-essential goods 827K
Cleaners 304K

Types of bar chartsTypes of bar charts

  • Grouped
  • Stacked

GroupedGrouped

A chart with grouping by dimension lets you compare two or more categories by a single measure. For example, grouping by delivery type allows you to compare the cost of products delivered by courier and picked up. Categories are highlighted in different colors and the length of the bar indicates the measure value.

horizontal-bar-chart-groupped-1

Source table
Subcategory Delivery Pickup
Beauty and health products 12K 32K
Kitchenware 394K 998K
Kitchen products 371K 749K
Detergents 127K 278K
Health and beauty equipment 497K 1,263K
Non-essential goods 268K 560K

Use a chart with grouping to compare two or more measures, such as the number of orders and the number of products. The bar length corresponds to the measure value.

horizontal-bar-chart-groupped-2

Source table
Subcategory Orders Number of products
Beauty and health products 481 1,470
Kitchenware 758 2,402
Kitchen products 480 1,371
Detergents 835 2,551
Health and beauty equipment 863 2,705
Non-essential goods 705 2,152
Cleaners 770 2,460

StackedStacked

A stacked chart shows a ratio of internal segments to the total value. Segments are placed one after another: the beginning of each subsequent segment is the outermost boundary of the previous one.
This type of chart is used to see the contribution of each measure to the total value by period or category. For example, to view the percentage of different expenses in the total budget amount.

horizontal-bar-chart-stacked

Source table
Month Gasoline Rent Food Utility bills
January 2019 100 600 300 500
February 2019 150 600 250 700
March 2019 100 600 450 400
April 2019 120 600 370 510
May 2019 100 600 300 530
June 2019 130 600 310 600
July 2019 150 600 330 510
August 2019 120 600 250 550
September 2019 110 650 380 500
October 2019 120 650 300 550
November 2019 130 650 310 540
December 2019 100 650 400 550

Wizard sectionsWizard sections

Section
section
Description
Y Dimensions. You can specify one or two dimensions.
X Measure. You can specify multiple measures. If you add more than one measure to a section, the Colors section will contain a dimension named Measure Names. You can move Measure Names to the Y axis.
Colors Measure Names dimension or field. Affects the column color. To delete Measure Names, click the cross icon or remove measures from the X axis.
Sorting Dimension or measure. Affects the column sorting. The sorting direction is marked with an icon next to the field: for ascending or for descending. To change the sorting direction, click the icon.
Labels Measure. Displays measure values on the chart. If multiple measures are added to the Y section, drag Measure Values to this section. Markup functions are supported. For String type fields, you can configure using basic Markdown syntax: click the icon before the field name and enable Markdown.
Filters Dimension or measure. Used as a filter.

Creating a bar chartCreating a bar chart

To create a bar chart:

Warning

If you use a new DataLens object model with workbooks and collections:

  1. Go to the DataLens home page. In the left-hand panel, select Collections and workbooks.
  2. Open the workbook, click Create in the top-right corner, and select the appropriate object.

Follow the guide from step 4.

  1. Go to the DataLens home page.
  2. In the left-hand panel, select Charts.
  3. Click Create chart → Chart.
  4. At the top left, click Select dataset and specify the dataset to visualize.
  5. Select Line chart as the chart type.
  6. Drag one or more dimensions from the dataset to the Y section. The values will be displayed on the Y axis.
  7. Drag one or more measures from the dataset to the X section.
  8. Drag a dimension from the dataset or the Measure Names field to the Color section.

A stacked column chart is displayed by default.

Creating a grouped bar chartCreating a grouped bar chart

To display an Y-axis grouped bar chart:

  1. Go to the bar chart that you created.

  2. Depending on the number of measures in the X section, follow these steps:

    Single measure
    Two or more measures
    1. Check if there is a dimension in the Colors section.
    2. Duplicate this dimension in the Y section. The sequence of dimensions affects the grouping order.
    1. Drag the Measure Names dimension to the Colors section.
    2. Drag the Measure Names dimension to the Y section. The sequence of dimensions affects the grouping order.

Adding a column color based on a measureAdding a column color based on a measure

To color columns in a chart based on the value of a measure:

  1. Go to the column chart that you created.

  2. Depending on the number of measures in the X section, follow the steps below:

    Single measure
    Two or more measures

    Copy the measure from the X section to the Colors section.

    The colors of the columns in the chart will apply based on the measure values.

    image

    Drag the Measure Values measure to the Colors section.

    The chart columns will be colored based on the values of all measures listed in section X.

    image

  3. Configure a color gradient for the measure as well. To do so, in the top-right corner of the Colors section, click (the icon is displayed when you hover over the section).

  4. In the color settings, specify:

    • Gradient type: Select two or three colors.
    • Gradient color: Select a color palette for the gradient from the list.
    • Gradient direction: Change the gradient direction using the icon.
    • Set threshold values: Set numeric thresholds for each color. Works if the X section contains a single value.

Configuring display of null valuesConfiguring display of null values

If the source data includes a row where the measure value is null, the chart will not be built for that point at default settings. For example, if the source has a row with a date (20.07.2022) but the sales amount for it is missing.

You can configure how the chart will display null values in the chart section settings:

  1. In the section with a measure whose values you want to show, in the top-right corner, click (the icon appears when you hover over the section).
  2. In Empty values (null), select Display as 0.
  3. Click Apply.

Now, the chart will use 0 instead of null.

If a row is missing from the source data completely, the chart section settings will not change the way the chart is presented. For example, if the source does not have a row with a certain date (20.07.2022), nothing will be shown for this date on the chart.

For more information, see Configuring the display of null values.

RecommendationsRecommendations

  • If the values of the categories contain a large amount of text, try to reduce it. Then the signatures on the diagram will look more accurate. You can use string functions in the calculated fields or conditional operators CASE.

  • Place segments inside bars so that the largest or most important categories are located to the left, closer to the chart's Y-axis. This makes it easier to compare the values.
  • When visualizing multiple measures, select colors carefully. They should be distinguishable and contrasting. We recommend using no more than 3-5 colors per chart. If you want to emphasize one certain measure above the others, highlight it in some bright color.

See alsoSee also

  • Creating a dashboard in DataLens
  • Adding a chart to a dashboard
  • Adding a selector to a dashboard

Was the article helpful?

Previous
Normalized column chart
Next
Normalized bar chart
Yandex project
© 2025 Yandex.Cloud LLC