Pie chart | Urbi Pro | 2GIS Documentation
Urbi Pro

Pie chart

A pie chart shows the ratio between the values ​​as slices of a circle (donut). Each slice shows a value fraction of the whole (of 100%).

Use a pie chart to show the proportion of data attribute values.

Case examples:

  • show the distribution of the mean area of ​​buildings built in different periods of time:

    Pie chart showing distribution of buildings by mean area
  • show percentage distribution of buildings with different purposes:

    Pie chart with distribution of buildings by purpose
  • The grouping attribute defines what data slices are displayed. 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 slices, 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.
  • The aggregation attribute defines the size of slices. 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.
  • A pie chart is suitable for displaying a small number of aggregation attribute values, e.g. for the top 5 values. If there are more attributes and some of them take up a small part of the pie, they will be displayed on the chart as narrow slices that are difficult to see on the widget.

  • A pie chart should contain all grouping attribute values ​​from the sample to display the correct percentages. If you selected the top 5 or top 10 values ​​as the text grouping attribute when creating a widget or editing it, group the remaining values ​​that are not in the top by selecting the Show other checkbox.

  • To see percentages, when creating a widget or editing it, select the Values ​​in percentage checkbox.

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

  2. Open the required dashboard.

  3. To open the scene, use the arrows Left arrow and Right arrow. If there is only one scene in a dashboard, it opens automatically when you open the dashboard.

  4. To open the list of layers, click Layers icon.

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

  6. 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.
    • Grouping attribute value: if you select a text grouping attribute, specify its values. You can select particular values ​​from the sample in the drop-down list or generate the top 5 or top 10 values ​​from the sample (the top values ​​are automatically calculated based on the aggregation attribute).
    • 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.
  7. Set the remaining widget parameters if necessary.

  8. Click Create.

A new widget is created and automatically added to the selected dashboard scene.

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. The grouping attribute defines what data slices of a circle are displayed.
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. The aggregation attribute defines the size of circle slices.
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.
Grouping attribute value The number of slices that are displayed on the graph. As values, you can select the following:
  • Any attribute values ​​from the sample in the drop-down list. You can change the order of the slices on the graph if necessary.
  • The top 5 or top 10 values ​​from the sample that are automatically calculated based on the aggregation attribute. To display the sum of the last value in the top and the remaining values ​​in the sample below this position in the last slice on the graph, select the Show other checkbox.

For text grouping attributes only.
Number of ranges The number of ranges (slices) 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.

For numeric grouping attributes only.
Parameter
Description
Color Selecting a color scale (a set of prepared color samples) according to which elements on the graph are colored.
Parameter
Description
Show legend Shows the values ​​of the grouping attribute and the corresponding values ​​of the aggregation attribute.
Values ​​in percentage Shows the values ​​of the aggregation attribute as a percentage.
Show source Shows the name of the data layer, the grouping attribute and the aggregation attribute, and also the aggregation type.
Show empty ranges Shows on the graph the ranges of values ​without data.
For numeric grouping attributes only.
Total value Shows the sum of the values ​​of the grouping attribute in the sample.
For numeric grouping attributes only.
Mean value Shows the mean value of the grouping attribute in the sample.
For numeric grouping attributes only.
Minimum value Shows the minimum value of the grouping attribute in the sample.
For numeric grouping attributes only.
Maximum value Shows the maximum value of the grouping attribute in the sample.
For numeric grouping attributes only.
Total objects in the asset Shows the number of objects in the sample that is used to calculate the values.