Chart series selectors
A selector means “include all matching results”. For example, it can select real GDP for every region without listing each variable. It uses the variable names and descriptions already present in the report’s projections CSV.
All regions
- chart:
title: Inflation by region
series:
- variable_prefix: INFL
selectors:
regions: all
Selected regions
- chart:
title: Real GDP comparison
series:
- variable_prefix: GDPR
selectors:
regions: [USA, CHN, JPN]
Regions and sectors
- chart:
title: Sector output
series:
- variable_prefix: OUP
selectors:
regions: [USA, CHN]
sectors: [a01, a02]
Dimension names come from the CSV column set_member_descriptions. For example, sectors=Agriculture,regions=United States identifies the dimensions of OUP(a01,USA): use a01 and USA as selector members, not the descriptive names. Capitalisation matters for the prefix, dimension keys and members. Common dimensions include regions, sectors, goods, dest, orig and sec_std. Every selected member must exist for the chosen prefix.
A selector must resolve at least one variable. It cannot set a per-line label or style; use exact series for those controls.
These selectors choose the series contained in a chart. To choose which dimension members readers can show and hide after the HTML page opens, use sector-selection controls.
Which rows are selected, and in what order?
A dimension may select all, a single code such as regions: USA, or a list such as regions: [USA, CHN]. Omitting a dimension leaves it unrestricted; omitting selectors selects every available row with the prefix. all is a reserved word, and member codes that look like numbers must be quoted.
All specified conditions must match. A selected list of members does not set the plotted order: matches follow their row order in the CSV. They appear at the selector’s position among the chart’s other series. Use exact series for a deliberate order, especially for successive simulation layers in a waterfall. Comparison bars may instead request value sorting.
Selectors do not create missing results or calculate derived variables. Add any required derived rows to the report data before using them in a chartpack.
G-Cubed