China Map¶
Used to display the distribution of a metric across different provincial-level administrative regions in China. Region tags can use either province identifiers or city names in Chinese or English.
Use Cases¶
- Viewing data that contains geographic location information
- Viewing scattered data, such as population density
- Comparing data magnitude through color depth
Chart Query¶
Prerequisites
The query results must contain a region tag that represents provinces or cities, and be grouped by that tag. Otherwise, the chart cannot correctly match and display regional data.
Supports four query types:
- Simple Query
- Expression Query
- PromQL Query
- Data Source Query
You can add multiple queries, but the by (grouping) Tag must be consistent.
For more details, see Chart Query.
The chart query matches administrative regions through the region tag and determines the color of the area by the metric value:
| Option | Description |
|---|---|
| Province Tag | Select the region tag that has been grouped in the query. The tag name is not required to be "province"; the value can be a province name in Chinese or English, a historical alias, a six-digit Chinese administrative division code, or a city name in Chinese or English. |
| Metric | When multiple metric queries are added, you can set the primary metric to display. The "Primary Display Metric" determines the metric used for the gradient color of the area. |
Region Matching Rules¶
- When using a province identifier, the metric value is directly aggregated to the corresponding provincial-level administrative region.
- When using a city name, the system first matches the city to its parent provincial-level administrative region, and then colors the area by the provincial region.
- When multiple cities belong to the same provincial-level administrative region, their metric values are summed and displayed.
- Cities with duplicate names that cannot be attributed, or unrecognized regions, will not participate in area coloring. Other recognizable regions can still be displayed normally.
The map supports dragging, zooming, and hovering to view data. When clicking a region, variable linking still uses the original region tag value returned by the query, not the converted display name from the map.