Column chart | Urbi Pro | 2GIS Documentation
Urbi Pro

Column chart

A column chart displays the data values ​​as vertical bars.

Use a column chart to compare the values ​​of a certain data attribute in different groups or ranges.

Case examples:

  • compare the mean values ​​of number of floors in buildings with different purposes:

    Column chart comparing the number of floors
  • compare the number of firms from different categories of food service:

    Column chart comparing the number of firms
  • The X-axis displays groups of data values. As a grouping attribute, you can select:

    • Text attributes: for example, firm category, building purpose, and others.

    • Numeric attributes: for example, number of reviews, building area, and others. To display data as multiple columns, specify the number of ranges and their limits in the Number of ranges field when creating a widget or editing it. You can set up ranges of different sizes. The specified upper limit is not included in the range.

      If you need to use a continuous scale and automatically set equal ranges of values ​​(set a step size), use a histogram.

  • The Y-axis displays aggregated values ​​for each group. The column height depends on the value. Aggregation is performed within one group or range. As an aggregation attribute, you can select:

    • Number of objects: to count the number of values ​​in a group or range.
    • Numeric attributes: to count the total, mean, minimum, or maximum value of this attribute within each group using aggregation functions.
  • Instead of a column chart, you can use a bar chart: they differ only in the orientation of the axes.

Example of creating a column chart
  1. Go to the Dashboards tab.

  2. Select the required dashboard.

  3. Click Layers icon.

  4. Click Layer menu icon next to the required layer and select Create widget.

  5. Specify the required parameters:

    • Layer: data layer that is used to build a graph on the widget.
    • Grouping attribute: attribute that is used to group data.
    • Aggregation attribute: attribute that is used to aggregate data and calculate the values. If you want to display only the number of values, select Number of objects.
    • Aggregation type: function that is used to calculate aggregation attribute values. Aggregation is performed within each group or range of data.
  6. Set the remaining widget parameters if necessary.

  7. Click Create.

Note

When working with the uploaded data, make sure that at least one attribute is specified in it to build a graph on the widget.

Parameter
Description
Widget name Widget name.
Layer Data layer that is used to build a graph on the widget.
Description Text description of the widget. You can format the text: customize headings; make the text bold, italic, or underline the text; add a link; select the text color from the palette or specify it in RGB, HSL, or HEX format.
Change widget type Click to select another widget type from the list. The configured widget parameters are saved.
Parameter
Description
Grouping attribute Attribute that is used to group data on the graph. Displayed on the X-axis.
Number of values For text grouping attributes only. The number of vertical bars that are displayed on the graph: the top 5 or top 10 values ​​from the sample. The top values ​​are calculated based on the aggregation attribute.
Show other For text grouping attributes only. The last bar on the graph shows the sum of the last value in the top and the remaining values ​​in the sample below this position. The top values ​​are calculated based on the aggregation attribute.
Number of ranges For numeric grouping attributes only. The number of ranges (columns) that are displayed on the graph. The available number of ranges depends on the data, the maximum number is 10. Ranges are calculated automatically, but you can set them manually by entering the required range limits. The specified upper limit is not included in the range.

To add a range, click Plus icon. To delete a range, click Trash icon. To recalculate ranges after configuration, click Recalculate ranges.
Parameter
Description
Aggregation attribute Number of objects or a numeric attribute that is used to aggregate data on the graph. Aggregation is performed within each group or range of data. Displayed on the Y-axis.
Aggregation type Function that is used to calculate aggregation attribute values in each group or range of data:
  • Sum: the sum of the values.
  • Mean: the mean value.
  • Min: the minimum value.
  • Max: the maximum value.
Parameter
Description
Color Different color settings are available, depending on the type of grouping attribute (text or numeric):
  • For text grouping attributes: selecting a color scale (a set of prepared color samples) according to which elements on the graph are colored.
  • For numeric grouping attributes: selecting a color according to which elements on the graph are colored. You can select a color from the palette or specify it in HEX format.
Parameter
Description
Show legend For text grouping attributes only. Shows the values ​​of the grouping attribute and the corresponding values ​​of the aggregation attribute.
Values ​​in percentage For text grouping attributes only. Shows the values ​​of the aggregation attribute as a percentage.
Parameter
Description
Labels Labels of attribute values ​​on the X and Y axes.
Axes Axes on the graph.
Grid Grid on the graph.
Parameter
Description
Show source Name of the data layer and the aggregation attribute.
Show empty ranges For numeric grouping attributes only. Shows on the graph the ranges of values ​without data.
Total value The sum of the values ​​of the aggregation attribute in the sample.
Mean value The mean value of the aggregation attribute in the sample.
Minimum value The minimum value of the aggregation attribute in the sample.
Maximum value The maximum value of the aggregation attribute in the sample.
Total objects in the asset Number of objects in the sample that is used to calculate the values.