Defaults, sections and inheritance

Defaults reduce repetition. An effective chart setting is taken from the chart, then its active section, then the chartpack defaults, then the renderer’s automatic choice.

Chartpack-wide years

- chartpack:
    format: gcubed-chartpack
    version: 1
    title: Policy experiment
    defaults:
      start_year: 2025
      end_year: 2040
- chart:
    series:
      - variable: INFL(USA)

Group charts in a section

- section:
    label: Macroeconomic outcomes
    start_year: 2025
    end_year: 2050
    y_axis:
      min: -5
      max: 10
- chart:
    title: Inflation
    series:
      - variable: INFL(USA)
- chart:
    title: Real GDP
    y_axis:
      max: 15
    series:
      - variable: GDPR(USA)

The second chart inherits min: -5 and replaces only max. A section lasts until the next section or the end of the document.

Inherit a complete series list

- section:
    series:
      - variable: INFL(USA)
- chart: {}

A chart’s own series replaces an inherited sequence; series are never concatenated. Every section must be followed by at least one chart.

Exact series


This site uses Just the Docs, a documentation theme for Jekyll.