Column chart
This chart displays the values of one or more measures by period or category. The height of a column determines the measure value: the higher the column, the larger the value.
Unlike line charts, this type of chart assumes that different periods are compared directly and an emphasis is made on a measure's individual value rather than its general trend.
Source table
Year | Sales |
---|---|
2022 | 6M |
2021 | 28M |
2020 | 18M |
2019 | 9M |
2018 | 1M |
Types of column charts
Grouped
A chart with grouping lets you compare two or more measures: for example, the number of products delivered and the number picked up. The column height corresponds to the measure value.
Source table
Year | Delivery | Pickup |
---|---|---|
2022 | 2M | 4M |
2021 | 8M | 19M |
2020 | 5M | 13M |
2019 | 3M | 6M |
2018 | 331K | 918K |
Stacked
This chart depicts the ratio of internal segments by period or category. The segments are stacked one on top of the other, i.e., the base of the above segment is the top side of the one below.
Since the sum of all segments is equal to the overall column length, the stacked chart is used when you need to visualize the total column values.
Source table
Year | Delivery | Pickup |
---|---|---|
2022 | 2M | 4M |
2021 | 8M | 19M |
2020 | 5M | 13M |
2019 | 3M | 6M |
2018 | 331K | 918K |
Wizard sections
Section section |
Description |
---|---|
X | Dimensions You can specify one or two dimensions. Affects X-axis value grouping. The order of specified dimensions affects the order of value grouping on the X-axis. For the Date and Date and time types, you can set grouping by time: minutes, hours, weeks, and so on. |
Y | 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. |
Colors | Dimension, measure, Measure Names or Measure Values field. Affects the column color. To delete Measure Names and Measure Values , click the |
Sorting | Dimension or measure. Affects the column sorting. Sorting only applies to dimensions used when building a chart. The sorting direction is marked with an icon next to the field: |
Labels | Measure. Displays measure values on the chart. When using multiple measures for a signature, add Measure Values. 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. |
Split | Dimension. Splits a chart horizontally by the selected dimension's values. The maximum number of splits per chart is 25. |
Filters | Dimension or measure. Used as a filter. A filter can be overridden by a dashboard selector if the selector is based on the same field. |
Creating a column chart
To create a column chart:
Warning
If you use a new DataLens object model with workbooks and collections:
- Go to the DataLens home page
. In the left-hand panel, select Collections and workbooks. - Open the workbook, click Create in the top-right corner, and select the appropriate object.
Follow the guide from step 4.
- Go to the DataLens home page
. - In the left-hand panel, select
Charts. - Click Create chart → Chart in Wizard.
- At the top left, click
Select dataset and specify the dataset to visualize. - Select Column chart as the chart type.
- 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.
- Drag one or more measures from the dataset to the Y section. The values will be displayed as columns on the Y-axis.
By default, a stacked chart is displayed if you have multiple measures.
Creating a grouped column chart
To display an X-axis grouped column chart:
-
Open a bar chart or create a new one.
-
Depending on the number of measures in the Y section, follow these steps:
Single measureTwo or more measures- Drag a dimension that you want to group the chart columns by to the Color section.
- Duplicate this dimension in the X section. The sequence of dimensions affects the grouping order.
- Drag the
Measure Names
dimension to the Color section. - Drag the
Measure Names
dimension to the X section. The sequence of dimensions affects the grouping order.
Adding a column color based on a measure
To color columns in a chart based on the value of a measure:
-
Open a column chart or create a new one.
-
Depending on the number of measures in the Y section, follow the steps below:
Single measureTwo or more measuresCopy the measure from the Y section to the Colors section.
The colors of the columns in the chart will apply based on the measure values.
Drag the
Measure Values
measure to the Color section.The colors of the columns in the chart will apply based on the values of all the measures listed in the Y section.
-
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). -
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 Y section contains a single value.
null
values
Configuring display of 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:
- 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). - In Empty values (null), select
Display as 0
. - 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.
Recommendations
-
If category values contain a lot of text, try to make it shorter so that chart signatures look neater. You can use string functions in calculated fields or the
CASE
conditional statements. -
If each column is a category rather than a time value, consider sorting the columns in ascending or descending order of the measure. This will make your chart look better and more informative. Sorting may also be helpful inside each column's subcategories.
-
We recommend using a column chart to display changes to a measure or measures over time. In this case, be careful when sorting values on the X-axis, because the user usually expects to see changes over time on the X-axis.
-
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.
-
You can split a chart by dimension into a number of small charts that are convenient to compare to one another. To do this, drag a dimension from the dataset to the Split section.
Chart example