Skip to main content

Statistical Card

Applicable Scenarios#

提供报表场景下的指标数据统计并展示功能。

Usage Instructions

Data Model Use Cases

  1. Set the data source for the statistical card, select the pre-built data model, and select the data source method as statistical.
  2. Configure the data value range through data filtering. For details, refer to the Data Filtering Configuration Document.
  3. Select the fields to be analyzed statistically.
  4. Configure the statistical method for the selected field(s). Currently, "Number" type fields support count, sum, maximum, minimum, and average; other type fields only support count.
  5. Select whether to count null values; by default, null values are not counted.
  • Supports display unit settings. Numerical magnitude: unit/ten/hundred/thousand/ten thousand/hundred thousand/million/ten million/hundred million.
  • Decimal places: Supports 0-10 decimal places.
  • Suffix: Supports customization. By default, it is generated based on the numerical magnitude as -/ten/hundred/thousand/ten thousand/hundred thousand/million/ten million/hundred million.

Properties

External properties received by the component

Property Name
Property Identifier
Type
Description
数据源dataSourceobject

方法的出入参需满足组件要求,查看文档

数据筛选filterData
字段选择fieldstring
统计方式operationTypestring
字段展示名称labelstring

Example: "今日活跃用户数"

是否统计空值isCountEmptyboolean

Example: false

是否显示单位isShowUnitboolean

Example: true

数值量级unitnumber

Example: 1

小数位数decimalDigitsnumber

Example: 0

后缀suffixstring

Events

Events exposed by the component. You can listen to component events to trigger external actions

Event Name
Event Code
Event Output Parameters event.detail
Applicable Scenarios
Description
点击tapCompatible with all platforms

-

APIs Usage Scenarios

When selecting APIs as the data source during configuration, users need to define data within the APIs according to the parameter structure to ensure proper rendering in the statistical card component. For details, refer to Chart Component Parameter Definitions.

? When using APIs, properties such as data filtering, field selection, statistical method, and null value statistics must be defined by the user within the created APIs. Other properties remain consistent with the configuration in the data model usage scenario.

Frequently Asked Questions

Why doesn't the chart support displaying Chinese names for fields such as association/enumeration?

Since the chart component retrieves statistical data by querying from the server-side, it currently does not support displaying Chinese names for association fields/enumeration fields/option set fields. If you need precise control over chart display, you can use the Universal Chart, which allows achieving various flexible display effects through configuration.

How to flexibly control various styles of the chart, such as centering the title?

Since the chart component itself only provides common configurations, for content that cannot be configured in the chart component, you can try using the Universal Chart to achieve various flexible display effects.

Relationship Between Chart Component and Universal Chart Component

  • The Universal Chart component is a versatile chart component that can be configured to generate various charts such as line charts, pie charts, area charts, maps, funnel charts, dashboards, and all other chart types. Using this component enables quick integration of all Echarts charts.
  • The UI configuration of the Universal Chart component is more flexible, supporting virtually all common chart types.
  • The Universal Chart component itself is independent of data. Data statistics can be achieved through Query, which is performed via APIs or MySQL connectors, and then bound to the Universal Chart component.