Reference

ChartAssemblyInput

Top-level fields for the Flint ChartAssemblyInput JSON object used in fenced blocks and spec attrs.

The fenced block content and the spec attr value must be a valid ChartAssemblyInput JSON object.

Top-level fields

FieldTypeRequiredDescription
data{ values?: Row[]; url?: string }✅Data source
semantic_typesRecord<string, string>—Per-field semantic type hints (Quantity, Time, Country, …)
chart_spec{ chartType, encodings, baseSize, … }✅Chart definition
theme_specstring | ThemeSpec—Visual theme — overrides the theme attr when present

Apply theme precedence

The theme attr and frontmatter flint.theme are injected into theme_spec before assembly. A value already present in theme_spec inside the JSON spec takes precedence.

Author a minimal bar chart

example.md
```flint backend="vegalite" theme="economist"
{
  "data": { "values": [{ "month": "Jan", "revenue": 120000 }] },
  "semantic_types": { "month": "Time", "revenue": "Money" },
  "chart_spec": {
    "chartType": "Bar Chart",
    "encodings": {
      "x": { "field": "month" },
      "y": { "field": "revenue" }
    },
    "baseSize": { "width": 560, "height": 320 }
  }
}
```

See the Flint documentation for full chart_spec and theme_spec schemas.

Copyright © 2026