How to Display Data Count by Category in iPortal?
2EXP 2025.06.10
I am using SuperMap iPortal to create a dashboard. One of the key insights I want to visualize is the number of features grouped by a specific column.

For example, I have the following data:

| No | Status | Type |

| 1  | Good   | A    |

| 2  | Bad    | A    |

| 3  | Good   | B    |

| 4  | Good   | B    |

| 5  | Good   | A    |

I would like to create a visualization that summarizes this data, such as a text indicator, bar chart, or pie chart, displaying:

-  Status:  Good = 4, Bad = 1

-  Type:  A = 60%, B = 40%

I want to generate this information directly from a single data source, without the need to preprocess or separate the data.

Issue I Am Facing:   

When creating visualizations in iPortal using line-based data (which includes length attributes), I encountered the following limitations:

1. I can select Status as the Category Field.

2. However, for the Value Field, I can only choose from columns such as `SMID`, `SMUserID`, `SMLength`, `SMTopoError`, or `SMGeoParam`.

3. As a result, the chart does not display the total number of features per category.

   - If I choose `SMLength`, the chart does not sum up the total length of all features within a category. Instead, it simply displays the individual length of each feature, which does not provide the aggregated count I need.

   - If I choose `SMID`, each feature is displayed as an individual value instead of an aggregated total.

 Questions:   

1. How can I display the total count of features per category in a bar chart, pie chart, or text indicator in iPortal?

2. If iPortal does not have a built-in feature for this, what alternative solutions can be used to achieve this visualization?

Thank you!

1 Answer

1、In the pie chart and bar chart, there is a "Statistic" parameter that allows for statistical calculations, as shown in the figure below. It can be used to count the total number of features in each category or to calculate the sum or average value of the features.

The indicator component has added a statistical function in version 12, but currently it cannot perform statistics by category, as shown in the figure below. Version 12 can be downloaded from the official website SuperMap Technical Resource Center | Comprehensive Online Technical Services.

If you need to perform statistics by category, you can use the low-code editor to write code for the statistics and calculations, and then use the indicator component to display the results.

Please feel free to let us know if you have any problem.

34EXP 2025.06.11
...