---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - en/visualization-ref/combined-chart
  - ru/visualization-ref/combined-chart
  - href: en/visualization-ref/combined-chart.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/visualization-ref/combined-chart.html
title: Combined chart in DataLens On-premises
description: >-
  In this tutorial, you will learn how to create and customize the combined
  chart visualization type in DataLens On-premises.
vcsPath: en/visualization-ref/combined-chart.md
---

# Combined chart <!-- diplodoc:svg ![](../_assets/datalens/combined.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#1A82E3" fill-rule="evenodd" d="M8 4v2.05a2.5 2.5 0 0 0-2.12.935L4 9.34V4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1Zm-3.827 9.935a1.518 1.518 0 0 1-.173.183v4.657l2.62-1.183a1.669 1.669 0 0 1 1.006-.116l.374.073V9.137l-3.827 4.798ZM8 18.772l-.614-.12a.417.417 0 0 0-.252.03l-3.13 1.413A1 1 0 0 0 5 21h2a1 1 0 0 0 1-1v-1.228Zm2 .189c.157-.049.307-.12.444-.215L14 16.311V20a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-1.039Zm4-4.115-4 2.74V12a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2.846Zm2 1.252V20a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-5.695l-1.69 1.653a1.662 1.662 0 0 1-1.763.354L16 16.098Zm4-3.49-2.557 2.502a.416.416 0 0 1-.44.088L16 14.806V9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3.608Z" clip-rule="evenodd"/><path fill="#FC4F51" fill-rule="evenodd" d="M2 21h20v-8.652l-3.69 3.61a1.662 1.662 0 0 1-1.763.354l-1.417-.554a.416.416 0 0 0-.386.044l-4.3 2.944c-.365.251-.82.344-1.258.259l-1.8-.353a.417.417 0 0 0-.252.03L2 21Z" clip-rule="evenodd"/><path stroke="#FC4F51" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="m20 3-6.731 4.786a1 1 0 0 1-.669.181l-4.677-.419a1 1 0 0 0-.871.372L3 13"/></svg> in DataLens On-premises

Combined chart is a separate type of visualization consisting of layers. Each layer is a separate type of diagram. You can combine [line charts](line-chart.md), [column charts](column-chart.md), and [area charts](area-chart.md).

### Features

* The **X**, **Sort**, and **Filters** sections are the same for all layers.
* You can add, delete, reorder and rename layers.
* Each layer is executed with a separate query in the database.
* The maximum number of layers is 5.

{% note info %}

* There is no color fill by measure in column charts.
* In a combined chart, sorting only applies to the layers it is supported for.

{% endnote %}

## What is important to know

* A combined chart is often used for plan/actual comparison. You can show the plan as a dashed line on the line chart layer, while presenting the actual values broken down into categories on the column chart layer.

   {% cut "Example" %}

   {% list tabs %}

   - Visualization

      ![combo-line-column](../_assets/datalens/visualization-ref/combined-chart/combo-line-column.png =800x)

   - Source table

      |Year|Category|Plan|Sales|
      |-----|-----|-----|-----|
      |2018|Household cleaners|435.53|449|
      |2018|Household goods|null|null|
      |2018|Home appliances|null|null|
      |2019|Household cleaners|503,255|512,282|
      |2019|Household goods|1,457,502|1,483,733|
      |2019|Home appliances|2,237,228.4|2,331,805|
      |2020|Household cleaners|1,623,124|1,644,668|
      |2020|Household goods|4,495,448|4,535,567|
      |2020|Home appliances|6,711,462.8|7,046,605|
      |2021|Household cleaners|2,686,134|2,737,436|
      |2021|Household goods|7,794,310|7,836,228|
      |2021|Home appliances|11,329,663.6|11,910,983|
      |2022|Household cleaners|2,512,031|2,652,918|
      |2022|Household goods|7,013,145|7,382,385|
      |2022|Home appliances|11,327,092|11,461,881|

   {% endlist %}

   {% endcut %}

* It is sometimes convenient to use a combined chart for same-type layers. For example, when one layer represents sales by category and another one shows the plan constant.

   {% cut "Example" %}

   ![combo-constant](../_assets/datalens/visualization-ref/combined-chart/combo-constant.png =800x)

   {% endcut %}

* You can display additional lines calculated using [window functions](..//function-ref/window-functions.md) or [LOD functions](..//function-ref/aggregation-functions.md#syntax-lod). For example, to calculate an average by category, use this formula: `avg(SUM([Sales] INCLUDE [Category]))`.

   {% cut "Example" %}

   ![combo-avg](../_assets/datalens/visualization-ref/combined-chart/combo-avg.png =800x)

   {% endcut %}

## Wizard sections {#wizard-sections}

Wizard<br/> section| Description
----- | ----
X | Dimension. You can specify only one field here. This dimension is usually a date. If this is the case, make sure to specify the `Date` data type for this field in the dataset. This is required for correct sorting and signature display. For better visualization, you can group dates into weeks, months, and years. For more information, see [Field settings](../concepts/chart/settings.md#field-settings). The **X** section is common for all layers.
Layer section | Allows you to add, delete, reorder, and rename layers. You can select a chart type for a layer: [line chart](line-chart.md), [column chart](column-chart.md), or [area chart](area-chart.md). The list of other sections depends on the layer chart type you select.<br/><br/> You can manage data display in the chart layers using the legend. To do this, click individual legend elements or select multiple elements by pressing and holding `Ctrl`/`Cmd`. You can enable or disable the legend in the chart settings. For more information, see [General settings](../concepts/chart/settings.md#common-settings).

## Creating a combined chart {#create-diagram}

To create a combined chart:


<!-- source: en/_includes/datalens/operations/datalens-workbooks-collections-note-step4.md -->
{% note warning %}

If you use the new DataLens object model with [workbooks and collections](../workbooks-collections/index.md):


1. Go to the DataLens home page.


1. Open the workbook, click **Create** in the top-right corner, and select the object you need.

Follow the guide from step 4.

{% endnote %}
<!-- endsource: en/_includes/datalens/operations/datalens-workbooks-collections-note-step4.md -->


1. <!-- source: en/_includes/datalens/visualization-ref/create-1.md -->
   Go to the DataLens home page.
   <!-- endsource: en/_includes/datalens/visualization-ref/create-1.md -->
1. <!-- source: en/_includes/datalens/visualization-ref/create-2.md -->
   In the left-hand panel, select <!-- diplodoc:svg ![chart](../_assets/console-icons/chart-column.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><g clip-path="url(#svg-y8gdf531__a)"><path fill="currentColor" fill-rule="evenodd" d="M11.5 3.5h2a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5m-2.5 9a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5H7a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5zm-4.5 0A.5.5 0 0 0 5 12v-2a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5zm-1 1.5h-1a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2q.26 0 .5.063V7a2 2 0 0 1 2-2h2q.26 0 .5.063V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2z" clip-rule="evenodd"/></g><defs><clipPath id="svg-y8gdf531__a"><path fill="currentColor" d="M0 0h16v16H0z"/></clipPath></defs></svg> **Charts**.
   <!-- endsource: en/_includes/datalens/visualization-ref/create-2.md -->
1. <!-- source: en/_includes/datalens/visualization-ref/create-3.md -->
   Click **Create chart** → **Chart**.
   <!-- endsource: en/_includes/datalens/visualization-ref/create-3.md -->
1. <!-- source: en/_includes/datalens/visualization-ref/create-4.md -->
   At the top left, click <!-- diplodoc:svg ![image](../_assets/console-icons/circles-intersection.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="M6.576 11.854a4 4 0 1 1 0-7.707A5.48 5.48 0 0 0 5 8c0 1.5.601 2.861 1.576 3.854M8 12.9a5.5 5.5 0 1 1 0-9.8 5.5 5.5 0 1 1 0 9.8m1.424-8.754A4.003 4.003 0 0 1 14.5 8a4 4 0 0 1-5.076 3.854A5.48 5.48 0 0 0 11 8c0-1.5-.601-2.861-1.576-3.854M8 4.877C8.914 5.61 9.5 6.737 9.5 8s-.586 2.39-1.5 3.123A4 4 0 0 1 6.5 8c0-1.263.586-2.39 1.5-3.123" clip-rule="evenodd"/></svg> **Select dataset** and specify the dataset to visualize. If you do not have a dataset, [create one](../dataset/create-dataset.md#create).
   <!-- endsource: en/_includes/datalens/visualization-ref/create-4.md -->
1. Select **Combined chart** as your chart type.
1. Drag a dimension from the dataset to the **X** section. The values will be displayed in the lower part of the chart on the X axis.
1. Select a layer chart type: line chart <!-- diplodoc:svg ![](../_assets/datalens/line.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20"><path fill="#FC4F51" d="m3.838 10.714-1.817 1.2-1.07-.703A1 1 0 0 1 2.05 9.539l1.79 1.175Zm3.64 2.39 4.31 2.83a.5.5 0 0 0 .518.02l9.705-5.438a1 1 0 1 1 .978 1.745l-9.705 5.437a2.5 2.5 0 0 1-2.595-.091l-5.028-3.303 1.817-1.2Z"/><path fill="#1A82E3" d="M2.05 15.487a1 1 0 0 1-1.1-1.669l6.48-4.276a2.5 2.5 0 0 1 1.877-.363l5.571 1.139a.5.5 0 0 0 .465-.148l6.427-6.854a1 1 0 1 1 1.458 1.368l-6.426 6.854a2.5 2.5 0 0 1-2.324.74l-5.571-1.14a.5.5 0 0 0-.375.073L2.05 15.487Z"/></svg>, column chart <!-- diplodoc:svg ![](../_assets/datalens/column.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><rect width="4" height="5.5" x="4" y="13.5" fill="#1A82E3" rx="1"/><rect width="4" height="9.5" x="10" y="9.5" fill="#1A82E3" rx="1"/><rect width="4" height="14" x="16" y="5" fill="#FC4F51" rx="1"/></g></svg>, or area chart <!-- diplodoc:svg ![](../_assets/datalens/area.svg) --><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none"><path fill="#1A82E3" d="M2 19.139V18l4.777-6.513a1 1 0 0 1 1.546-.082l.802.882a1 1 0 0 0 1.58-.13l3.557-5.514a1 1 0 0 1 1.609-.098l.82.984a1 1 0 0 0 1.568-.04L22 2.5v5.812l-4.81 5.108-.926-.489a2.5 2.5 0 0 0-2.678.218l-3.874 2.937-1.276-.403a2.5 2.5 0 0 0-2.233.369L2 19.139Z"/><path fill="#FC4F51" d="M2 21h20V10.5l-3.978 4.226a1 1 0 0 1-1.195.199l-1.264-.668a1 1 0 0 0-1.07.088l-4.08 3.093a1 1 0 0 1-.906.156l-1.523-.481a1 1 0 0 0-.893.148L2 21Z"/></g></svg>. Rename the layer, if required.
1. Create a chart of the appropriate type:

   * [Creating a line chart](line-chart.md#create-diagram)
   * [Creating a column chart](column-chart.md#create-diagram)
   * [Creating an area chart](area-chart.md#create-diagram)

1. Add a new layer. To do this, click <!-- diplodoc:svg ![](../_assets/console-icons/plus.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="M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75" clip-rule="evenodd"/></svg> to the right of the layer name.

<!-- source: en/_includes/datalens/visualization-ref/see-also-sub.md -->
#### Useful links {#see-also}

* [Creating a dashboard in DataLens On-premises](../operations/dashboard/create.md)
* [Adding a chart to a dashboard in DataLens On-premises](../operations/dashboard/add-chart.md)
* [Adding a selector to a dashboard in DataLens On-premises](../operations/dashboard/add-selector.md)
<!-- endsource: en/_includes/datalens/visualization-ref/see-also-sub.md -->